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

PopupItemTemplate Height

1 Answer 65 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.
BillVo
Top achievements
Rank 1
BillVo asked on 23 Aug 2013, 02:15 PM
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>

1 Answer, 1 is accepted

Sort by
0
Deyan
Telerik team
answered on 26 Aug 2013, 08:26 AM
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 >>
Tags
ListPicker
Asked by
BillVo
Top achievements
Rank 1
Answers by
Deyan
Telerik team
Share this question
or