2010-03-09 103 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}"/> 

的我真的不能提供比,雖然更多的幫助不知道你真正希望達到的目標。

相關問題