ListPicker size

3 posts, 1 answers
  1. Joe
    Joe avatar
    8 posts
    Member since:
    May 2019

    Posted 22 Oct Link to this post

    I have a small list, so would like to decrease the height of the ListPicker popup.  Is there a way to control this height?

    Thanks

  2. Answer
    Yana
    Admin
    Yana avatar
    5002 posts

    Posted 22 Oct Link to this post

    Hi Joe,

    You can control the popup size through the PopupViewStyle property of the PickerPopupSelectorSettings class that need to be assigned to the SelectorSettings of RadListPicker. 

    First, you need to create a Style that targets PickerPopupContentView control:

    <Style TargetType="telerikInput:PickerPopupContentView" x:Key="popupViewStyle">
    	<Setter Property="BackgroundColor" Value="White"/>
    	<Setter Property="WidthRequest" Value="270"/>
    	<Setter Property="HeightRequest" Value="200" />
    </Style>
    

    And assign it to the ListPicker:

    <telerikInput:RadListPicker ItemsSource="{Binding Items}" 
    							DisplayMemberPath="Name">	
    	<telerikInput:RadListPicker.SelectorSettings>
    		<telerikInput:PickerPopupSelectorSettings PopupViewStyle="{StaticResource popupViewStyle}" />												
    	</telerikInput:RadListPicker.SelectorSettings>
    </telerikInput:RadListPicker>

    For detailed information on the customizations options of RadListPicker check its Styling topic.

    Regards,
    Yana
    Progress Telerik

    Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

  3. Joe
    Joe avatar
    8 posts
    Member since:
    May 2019

    Posted 26 Oct in reply to Yana Link to this post

    Thanks.  Exactly what I was looking for.
Back to Top