How to change the font size of the popup items?

5 posts, 0 answers
  1. Roger
    Roger avatar
    4 posts
    Member since:
    Sep 2013

    Posted 16 Oct 2013 Link to this post

    It is appreciated if anyone could provide a sample.

    Thanks.
  2. Roger
    Roger avatar
    4 posts
    Member since:
    Sep 2013

    Posted 16 Oct 2013 Link to this post

    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>
  3. DevCraft banner
  4. Roger
    Roger avatar
    4 posts
    Member since:
    Sep 2013

    Posted 16 Oct 2013 Link to this post

    <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>
  5. Kiril Stanoev
    Admin
    Kiril Stanoev avatar
    1512 posts

    Posted 17 Oct 2013 Link to this post

    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.
  6. Roger
    Roger avatar
    4 posts
    Member since:
    Sep 2013

    Posted 17 Oct 2013 Link to this post

    Thanks. It works perfectly!
Back to Top
DevCraft banner