我正在将功能从WPF转换为Silverlight(对我而言是新的),我遇到了x:Type属性的问题。这是我的xaml
<sdk:TabControl Name="tabDynamic" ItemsSource="{Binding}" SelectionChanged="tabDynamic_SelectionChanged">
<sdk:TabControl.Resources>
<DataTemplate x:Key="TabHeader" DataType="sdk:TabItem">
<toolkit:DockPanel>
<Button Name="btnDelete" toolkit:DockPanel.Dock="Right" Margin="5,0,0,0" Padding="0" Click="btnDelete_Click" CommandParameter="{Binding RelativeSource={RelativeSource AncestorType={x:Null TabItem}}, Path=Name}">
<Image Source="/delete.gif" Height="11" Width="11"></Image>
</Button>
<TextBlock Text="{Binding RelativeSource={RelativeSource AncestorType=sdk:TabItem}, Path=Header}"/>
</toolkit:DockPanel>
</DataTemplate>
找不到X:类型。
<Button Name="btnDelete" toolkit:DockPanel.Dock="Right" Margin="5,0,0,0" Padding="0" Click="btnDelete_Click" CommandParameter="{Binding RelativeSource={RelativeSource AncestorType={x:Null TabItem}}, Path=Name}">
有没有办法支持Silverlight中的x:Type标记?