Jer*_*emy 8 windows-phone-7 pivotitem
我想在PivotItem控件中设置字体的大小.显式设置PivotItem FontSize似乎没有做任何事情,也没有将PivotItem样式设置为"{StaticResource PhoneFontSizeSmall}"我唯一能找到的将改变字体大小的是Pivot控件上的FontSize属性,但这只是更改数据透视表本身的标题文本的大小,但我想更改PivotItem标题文本的大小.
编辑:好的我已经学会了如何使用它<controls:PivotItem.Header>,但我如何使用绑定?例如:
<controls:Pivot x:Name="pvtKey"
Grid.Row="1"
Height="60"
ItemsSource="{Binding Keys}">
<controls:Pivot.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding}" FontSize="5"/>
</DataTemplate>
</controls:Pivot.ItemTemplate> </controls:Pivot>
Run Code Online (Sandbox Code Playgroud)
Chr*_*oph 16
<controls:Pivot Title="whatever" Name="pivot">
<controls:PivotItem Margin="11,28,13,0" >
<controls:PivotItem.Header>
<Grid>
<TextBlock Name="FirstPivot" FontSize="31" Text="FirstPivot" />
</Grid>
</controls:PivotItem.Header>
<Grid> <!-- content --> </Grid>
</controls:Pivot>
Run Code Online (Sandbox Code Playgroud)
这应该做到这一点
Jer*_*emy 11
解决了:
<controls:Pivot x:Name="pivot"
ItemsSource="{Binding MyItems}"
SelectedItem="{Binding Path=SelectedItem, Mode=TwoWay}">
<controls:Pivot.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding}" FontSize="20"/>
</DataTemplate>
</controls:Pivot.HeaderTemplate>
</controls:Pivot>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
11238 次 |
| 最近记录: |