0
我有一個分離的程序集,我定義了幾個標準的UserControls。一些這是標準的工具欄,就像這樣:在XAML節點中加載用戶控件的問題
<UserControl x:Class="XXX.ToolbarFullMaintenance"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
>
<ToolBar
Style="{DynamicResource ToolbarMainStyle}"
>
/* MY BUTTONS */
</ToolBar>
</UserControl>
現在,我會插入一個ToolBarTray這裏面的工具欄我的窗戶。我試圖做到這一點:
<ToolBarTray>
<toolbars:ToolbarFullMaintenance
Band="1"
BandIndex="1"
Name="mainToolbar" />
</ToolBarTray>
但不工作...「mainToolbar」看起來像一個UserControl,而不像一個工具欄。 我該怎麼辦?