PopupItemTemplate Height

2 posts, 0 answers
  1. BillVo
    BillVo avatar
    12 posts
    Member since:
    Aug 2010

    Posted 23 Aug 2013 Link to this post

    Hello,

    Is it possible to control the height of a ListPicker's items in Popup mode?  I'm using a FontSize of 15.  I see 9-10 items at a time with a gap of roughly 45 points between each pair.

    Thanks,
    BillVo
    <telerikInput:RadListPicker.PopupItemTemplate>
        <DataTemplate>
            <Border BorderBrush="Gray" BorderThickness="2" Height="20" Margin="0" Padding="0">
                <TextBlock Text="{Binding Name}" FontSize="15" Margin="0" Padding="0" />
            </Border>
        </DataTemplate>
    </telerikInput:RadListPicker.PopupItemTemplate>

  2. Deyan
    Admin
    Deyan avatar
    2037 posts

    Posted 26 Aug 2013 Link to this post

    Hi Bill,

    Thanks for writing and for your question.

    You can use the PopupItemStyle property exposed by RadListPicker to update the style of the popup items. By default, this style looks like following:

    <Setter Property="PopupItemStyle">
               <Setter.Value>
                   <Style TargetType="telerikPrimitives:RadDataBoundListBoxItem">
                       <Setter Property="Padding" Value="24, 26, 0, 26"/>
                   </Style>
               </Setter.Value>
           </Setter>

    As you can see, there is a Padding defined which determines the spacing between the items. You can update this padding to change the appearance.

    I hope this helps.

    Regards,
    Deyan
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINDOWS PHONE 7.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. DevCraft banner
Back to Top