我在 xaml 中收到类似“类型引用找不到名为‘Sign’的公共类型”的错误。我该如何解决。Sign 类在同一个程序集中。
<DataTemplate DataType="{x:Type local:Sign}">
<Expander Padding="4"
IsExpanded="{Binding RelativeSource={
RelativeSource Mode=FindAncestor, AncestorType={
x:Type ListBoxItem}}, Path=IsSelected}">
<Expander.Header>
<TextBlock Text="{Binding Name}" ... />
</Expander.Header>
<DockPanel LastChildFill="True">
<Border DockPanel.Dock="Left" CornerRadius="16" BorderBrush="WhiteSmoke" Background="AliceBlue" BorderThickness="5" HorizontalAlignment="Center" VerticalAlignment="Center">
<Image Source="{Binding Icon}" Width="90" Height="90" Stretch="Fill" />
</Border>
...
</DockPanel>
</Expander>