Reputation: 1228
I have two ListPicker. I have bound lpkfamilymemberfrom database and lpkpaymentmode from array value.I want to two as FullScreen mode and in full screen I want item font size 40. In lpkfamilymemberfrom I achieve font size 40 as I have done following code.But I dont know how to achive this for lpkpaymentmode becoze it has not any datatemplate becoz I bound it using Array.
<DataTemplate x:Name="PickerFullModeItemTemplate">
<StackPanel Orientation="Horizontal" Margin="16 21 0 20">
<TextBlock Text="{Binding Name}" Margin="16 0 0 0" FontSize="43" FontFamily="{StaticResource PhoneFontFamilyLight}"/>
</StackPanel>
</DataTemplate>
<toolkit:ListPicker Background="White" FontSize="44" ExpansionMode="FullScreenOnly" x:Name="lpkpaymentmode"/>
<toolkit:ListPicker ItemTemplate="{StaticResource PickerItemTemplate}" Background="White" FullModeItemTemplate="{StaticResource PickerFullModeItemTemplate}" ExpansionMode="FullScreenOnly" x:Name="lpkfamilymember"/>
And Binding Code:
String[] Mode = { "Cash", "Credit Card", "Debit Card","Net Banking" };
InitCustomPickerDialog();
this.lpkpaymentmode.ItemsSource = Mode;
this.lpkfamilymember.ItemsSource = GetfamilyList();
public IList<FamilyVO> GetfamilyList()
{
// Fetching data from local database
IList<FamilyVO> FamilyList = null;
using (ExpenseDataContext Empdb = new ExpenseDataContext(strConnectionString))
{
IQueryable<FamilyVO> ExpQuery = from Exp in Empdb.Family select Exp;
FamilyList = ExpQuery.ToList();
}
return FamilyList;
}
I have tried many code to set item size of lpkpaymentmode to 40 in full mode but every time it show some fix size which did not change.
Upvotes: 1
Views: 1077
Reputation: 15006
How about this:
<DataTemplate x:Name="ItemTemplateForPayment">
<TextBlock Text="{Binding }" Margin="16 0 0 0" FontSize="40" FontFamily="{StaticResource PhoneFontFamilyLight}"/>
</DataTemplate>
And then applying like this:
<toolkit:ListPicker ItemTemplate="{StaticResource PickerItemTemplate}" Background="White" FullModeItemTemplate="{StaticResource ItemTemplateForPayment}" ExpansionMode="FullScreenOnly" x:Name="lpkpaymentmode"/>
Upvotes: 2