This is a migrated thread and some comments may be shown as answers.

How to change the font size of the popup items?

4 Answers 152 Views
ListPicker
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Roger
Top achievements
Rank 1
Roger asked on 16 Oct 2013, 10:21 PM
It is appreciated if anyone could provide a sample.

Thanks.

4 Answers, 1 is accepted

Sort by
0
Roger
Top achievements
Rank 1
answered on 16 Oct 2013, 10:50 PM
Got it. It looks like it needs to modify the data template of the PopupItemTemplate:

 <telerikInput:RadListPicker
                                HorizontalAlignment="Stretch"
                                Header="Trunk Group:"
                                PopupHeader="Please select a trunk group:" Height="Auto"
                                ItemsSource="{Binding  ElementName=Equipment, Path=SelectedItem.TrunkGroups}"
                                SelectedItem="{Binding ElementName=Equipment, Path= SelectedItem.SelectedTrunkGroup, Mode=TwoWay}"
                                ActionButtonVisibility="Visible" FontSize="20">

                                <telerikInput:RadListPicker.PopupItemTemplate>
                                    <DataTemplate>
                                        <TextBlock Text="{Binding}" FontSize="26" />
                                    </DataTemplate>
                                </telerikInput:RadListPicker.PopupItemTemplate>
 </telerikInput:RadListPicker>
0
Roger
Top achievements
Rank 1
answered on 16 Oct 2013, 11:06 PM
<telerikInput:RadListPicker
                               HorizontalAlignment="Stretch"
                               Header="Trunk Group:"
                               PopupHeader="Please select a trunk group:" Height="Auto"
                               ItemsSource="{Binding  ElementName=Equipment, Path=SelectedItem.TrunkGroups}"
                               SelectedItem="{Binding ElementName=Equipment, Path= SelectedItem.SelectedTrunkGroup, Mode=TwoWay}"
                               ActionButtonVisibility="Visible" FontSize="20">
 
                               <telerikInput:RadListPicker.PopupItemTemplate>
                                   <DataTemplate>
                                       <TextBlock Text="{Binding}" FontSize="26" />
                                   </DataTemplate>
                               </telerikInput:RadListPicker.PopupItemTemplate>
</telerikInput:RadListPicker>
0
Kiril Stanoev
Telerik team
answered on 17 Oct 2013, 08:02 AM
Hi Roger,

You can try the following approach:

<telerikInput:RadListPicker x:Name="listPicker1">
    <telerikInput:RadListPicker.PopupItemStyle>
        <Style TargetType="telerikPrimitives:RadDataBoundListBoxItem">
            <Setter Property="Padding" Value="24, 26, 0, 26" />
            <Setter Property="FontSize" Value="55" />
        </Style>
    </telerikInput:RadListPicker.PopupItemStyle>
</telerikInput:RadListPicker>

public partial class ID747850 : PhoneApplicationPage
{
    public ID747850()
    {
        InitializeComponent();
        this.listPicker1.ItemsSource = Enumerable.Range(0, 20);
    }
}



Give it a try and let us know how it goes.

 Regards,
Kiril Stanoev
Telerik
Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
0
Roger
Top achievements
Rank 1
answered on 17 Oct 2013, 10:36 AM
Thanks. It works perfectly!
Tags
ListPicker
Asked by
Roger
Top achievements
Rank 1
Answers by
Roger
Top achievements
Rank 1
Kiril Stanoev
Telerik team
Share this question
or