Xaml 如何在WindowsPhone8.1中为treeview中的每个级别提供不同的样式?
我已经使用WinRTXamlToolkit实现了我的treeview,它工作得很好问题是我想为每个级别显示不同的字体大小和字体样式,我尝试从模型类绑定字体大小,但我的模型类包含自己的类列表,所以我也找不到级别1,有人能帮我解决我的问题吗,提前感谢:) 下面是我的xaml代码和屏幕截图Xaml 如何在WindowsPhone8.1中为treeview中的每个级别提供不同的样式?,xaml,windows-phone-8.1,Xaml,Windows Phone 8.1,我已经使用WinRTXamlToolkit实现了我的treeview,它工作得很好问题是我想为每个级别显示不同的字体大小和字体样式,我尝试从模型类绑定字体大小,但我的模型类包含自己的类列表,所以我也找不到级别1,有人能帮我解决我的问题吗,提前感谢:) 下面是我的xaml代码和屏幕截图 <XC:TreeView Margin="-5,0,0,0"
<XC:TreeView
Margin="-5,0,0,0"
VerticalAlignment="Top"
ItemContainerStyle="{StaticResource TreeViewItemStyle1}"
ItemsSource="{Binding ObjShopItems}">
<XC:TreeView.ItemTemplate>
<DataTemplate>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<TextBlock
Grid.Column="0"
FontSize="{StaticResource TextStyleExtraLargeFontSize}"
Text="{Binding Name}"
TextWrapping="Wrap" />
</Grid>
<XCDATA:DataTemplateExtensions.Hierarchy>
<XCDATA:HierarchicalDataTemplate ItemsSource="{Binding Items}" />
</XCDATA:DataTemplateExtensions.Hierarchy>
</DataTemplate>
</XC:TreeView.ItemTemplate>
<interactivity:Interaction.Behaviors>
<core:EventTriggerBehavior EventName="Tapped">
<core:InvokeCommandAction Command="{Binding Path=TreeviewCommand}" />
</core:EventTriggerBehavior>
</interactivity:Interaction.Behaviors>
</XC:TreeView>
@user39566:嗨,我已经安排好了密码:)你能通过发布密码来回答你的问题吗?Thx将不胜感激