RadListPicker title is not showing in UWP as it is showing in Android and iOS.

1 Answer 54 Views
ListPicker
Dilip Kumar
Top achievements
Rank 1
Dilip Kumar asked on 19 Sep 2024, 09:49 AM
Hi Team,

I am using RadListPicker in MAUI application. Title is not showing in UWP as it is showing in Android and iOS.

Here is the code I am using.

In Xaml page

    <telerikPrimitives:RadListPicker AutomationId="ProjectName" VerticalOptions="CenterAndExpand" Grid.Column="2" Placeholder="Project" DisplayLabelStyle="{StaticResource displayLabelStyle}"
                                     HorizontalOptions="CenterAndExpand" BackgroundColor="{StaticResource DefaultTransparentColor}"
                                     ItemsSource="{Binding ResourceAssignedProjects}" DisplayMemberPath="Project" SelectedItem="{Binding ResourceSelectedProject}"
                                     BorderColor="{OnPlatform iOS={StaticResource DefaultTransparentColor}}">
    <telerikPrimitives:RadListPicker.ItemTemplate>
        <DataTemplate>
            <Label AutomationId="SelectProjectHomePage" 
                       Text="{Binding Project}" 
                       HorizontalTextAlignment="Center" 
                       VerticalTextAlignment="Center" 
                       TextColor="{StaticResource DefaultBlackColor}"/>
        </DataTemplate>
    </telerikPrimitives:RadListPicker.ItemTemplate>
    <telerikPrimitives:RadListPicker.PopupSettings>
        <telerikPrimitives:PickerPopupSettings AcceptButtonStyle="{StaticResource acceptButtonStyle}" 
                                                   CancelButtonStyle="{StaticResource cancelButtonStyle}" 
                                                   HeaderLabelStyle="{StaticResource headerLabelStyle}"
                                                   HeaderLabelText="{x:Static resources:AppResources.Project}" 
                                                   PopupViewStyle="{StaticResource popupViewStyle}" 
                                                   HeaderStyle="{StaticResource headerStyle}"/>
    </telerikPrimitives:RadListPicker.PopupSettings>
</telerikPrimitives:RadListPicker>

Using following version:


MAUI with .NET 8.0
CommunityToolkit.Maui 9.0.3
Telerik.UI.for.Maui :- 7.0.0


Kindly help me out with this.


Thanks & Regards,

Dilip.

1 Answer, 1 is accepted

Sort by
0
Accepted
Yana
Telerik team
answered on 19 Sep 2024, 12:42 PM

Hello Dilip,

The ListPicker provides two picker modes - Popup and DropDown. By default on mobile (Android and iOS) the PickerMode is Popup, while on Desktop (Windows, MacOS), it is DropDown.  Basically, that's why the control looks differently on Windows.

You can explicitly set the Popup mode on all platforms through the PickerMode property:

<telerik:RadListPicker PickerMode="Popup"  />

Give it a try and let me know if you have any further questions on this.

Regards,
Yana
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
ListPicker
Asked by
Dilip Kumar
Top achievements
Rank 1
Answers by
Yana
Telerik team
Share this question
or