I have a ListPicker, and when I click on it I have the full screen popup, but the options there are all pretty small, and I can't change the FontSize for whatever reason.
Code:
<phone:PhoneApplicationPage.Resources>
<DataTemplate x:Name="PickerFullItemTemplate">
<StackPanel>
<TextBlock Text="{Binding Number}"/>
</StackPanel>
</DataTemplate>
</phone:PhoneApplicationPage.Resources>
<toolkit:ListPicker ExpansionMode="FullScreenOnly" Name="Picker" ItemsSource="{Binding Number, ElementName=this}" FullModeItemTemplate="{Binding PickerFullItemTemplate}" />
How do I make the text for the full screen popup size 36 font?
Edit:
I should mention that if I set the font size in the templates (as suggested below) it doesn't work. I can set the font size on the list picker but obviously that doesn't change the full mode popup.
Also, I have taken the ListPicker out of the Pivot it is contained within and commented out as much as possible so there is nothing possibly overriding this setting but still nothing.
Do the following:
1) Create a class with your list of values
public class Number
{
public IEnumerable<string> number { get { return "AA1,AA2,AA3".Split(','); } }
}
2) Declare the namespace of your project in the top of the xaml file
xmlns:local="clr-namespace:YourAppNameSpaceGoesHere"
3) Declare your class as a resource in the PhoneApplicationPage Resources section
4) In your DataTemplate TextBlock, just define the Text value as "{Binding}" and set your FontSize
<phone:PhoneApplicationPage.Resources>
<local:Number x:Key="Number"/>
<DataTemplate x:Name="PickerFullItemTemplate">
<StackPanel>
<TextBlock Text="{Binding}" FontSize="36"/>
</StackPanel>
</DataTemplate>
</phone:PhoneApplicationPage.Resources>
5) Wrap your ListPicker control is a container control like a Grid and set the Grid's DataContext to your class
6) The FullModeItemTemplate in your ListPicker should be defined as a StaticResource
<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0" DataContext="{StaticResource Number}">
<toolkit:ListPicker ExpansionMode="FullScreenOnly" Name="Picker" ItemsSource="{Binding number}" FullModeItemTemplate="{StaticResource PickerFullItemTemplate}" />
</Grid>
The following should work.
<DataTemplate x:Name="PickerFullItemTemplate">
<StackPanel>
<TextBlock Text="{Binding Number}" FontSize="36"/>
</StackPanel>
</DataTemplate>
how about:
<Style x:Key="LPickFullModeTxtBlock" TargetType="TextBlock">
<Setter Property="FontSize" Value="30"/>
</Style>
<toolkit:ListPicker.FullModeItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding bindProp}" VerticalAlignment="Top" HorizontalAlignment="Left" Style="{StaticResource LPickFullModeTxtBlock}"></TextBlock>
</DataTemplate>
</toolkit:ListPicker.FullModeItemTemplate>