2010-03-09 99 views

回答

0

你可以在你这样的XAML根元素添加到命名空间的引用...

<UserControl 
    x:Class="MySolution.MyNamespace.MyControl" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:another="clr-namespace:MySolution.AnotherNamespace"> 

之后就可以引用从该命名空间中的物体在XAML中,例如,我要命令属性绑定我的按钮在AnotherNamespace一个命令

<Button Command="{x:Static another:MyCommand}"/> 

的我真的不能提供比,虽然更多的帮助不知道你真正希望达到的目标。

相关问题