【发布时间】:2015-10-26 10:59:38
【问题描述】:
我希望有人可以帮助我。 我有一个 WPF 项目(它工作正常),我想使用它 在另一个。但我得到了 System.Windows.Markup.XamlParseException。
在:
<Expander IsExpanded="True"
Header="Symbols"
Margin="0,1,0,0"
Content="{StaticResource SymbolStencils}" />
我的 SymbolStencil 看起来像:
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:s="clr-namespace:DiagramDesigner">
<s:Toolbox x:Key="SymbolStencils"
DefaultItemSize="55,55">
<ItemsControl.Items>
<Button IsHitTestVisible="False">Button</Button>
<ComboBox IsHitTestVisible="False" />
<Label IsHitTestVisible="False" >Label</Label>
<ListBox IsHitTestVisible="False" />
<Rectangle IsHitTestVisible="False" />
<TextBox IsHitTestVisible="False" >Text</TextBox>
<TextBlock IsHitTestVisible="False" >Text</TextBlock>
<RadioButton IsHitTestVisible="False" />
<CheckBox IsHitTestVisible="False" />
</ItemsControl.Items>
</s:Toolbox>
【问题讨论】:
-
您是否在存在 Expander 的 Xaml 文件中包含资源字典?
标签: wpf visual-studio xaml