Introducing .NET MAUI Pickers for Efficient User Interactions
Live Chat Icon For mobile
Live Chat Icon
Popular Categories.NET  (175).NET Core  (29).NET MAUI  (208)Angular  (109)ASP.NET  (51)ASP.NET Core  (82)ASP.NET MVC  (89)Azure  (41)Black Friday Deal  (1)Blazor  (220)BoldSign  (15)DocIO  (24)Essential JS 2  (107)Essential Studio  (200)File Formats  (67)Flutter  (133)JavaScript  (221)Microsoft  (119)PDF  (81)Python  (1)React  (101)Streamlit  (1)Succinctly series  (131)Syncfusion  (920)TypeScript  (33)Uno Platform  (3)UWP  (4)Vue  (45)Webinar  (51)Windows Forms  (61)WinUI  (68)WPF  (159)Xamarin  (161)XlsIO  (37)Other CategoriesBarcode  (5)BI  (29)Bold BI  (8)Bold Reports  (2)Build conference  (8)Business intelligence  (55)Button  (4)C#  (151)Chart  (132)Cloud  (15)Company  (443)Dashboard  (8)Data Science  (3)Data Validation  (8)DataGrid  (63)Development  (633)Doc  (8)DockingManager  (1)eBook  (99)Enterprise  (22)Entity Framework  (5)Essential Tools  (14)Excel  (41)Extensions  (22)File Manager  (7)Gantt  (18)Gauge  (12)Git  (5)Grid  (31)HTML  (13)Installer  (2)Knockout  (2)Language  (1)LINQPad  (1)Linux  (2)M-Commerce  (1)Metro Studio  (11)Mobile  (508)Mobile MVC  (9)OLAP server  (1)Open source  (1)Orubase  (12)Partners  (21)PDF viewer  (43)Performance  (12)PHP  (2)PivotGrid  (4)Predictive Analytics  (6)Report Server  (3)Reporting  (10)Reporting / Back Office  (11)Rich Text Editor  (12)Road Map  (12)Scheduler  (52)Security  (3)SfDataGrid  (9)Silverlight  (21)Sneak Peek  (31)Solution Services  (4)Spreadsheet  (11)SQL  (11)Stock Chart  (1)Surface  (4)Tablets  (5)Theme  (12)Tips and Tricks  (112)UI  (387)Uncategorized  (68)Unix  (2)User interface  (68)Visual State Manager  (2)Visual Studio  (31)Visual Studio Code  (19)Web  (597)What's new  (333)Windows 8  (19)Windows App  (2)Windows Phone  (15)Windows Phone 7  (9)WinRT  (26)
Efficient User Interaction A Step-by-Step Guide to NET MAUI Pickers

Introducing .NET MAUI Pickers for Efficient User Interactions

We are happy to introduce the new picker controls in our Syncfusion .NET MAUI suite from the 2023 Volume 3 release!

The Syncfusion .NET MAUI picker controls are fully customizable components that offer a simple yet attractive UI, enhancing your application with a smooth and touch-friendly user experience. These controls provide a unified UI across all platforms, simplifying the selection process.

Let’s explore the features of the following new picker controls rolled out in the 2023 Volume 3 release and the steps to get started with them:

Picker

The new .NET MAUI Picker (SfPicker) is a versatile control that empowers users to select a single item from a list of options. It offers a seamless and highly customizable solution to enhance the user experience.

.NET MAUI Picker
.NET MAUI Picker

Key features

The key features of the .NET MAUI Picker control are as follows:

  • Multiple columns: Users can select items from lists organized into multiple columns.
  • Header view: Display and customize header text.
  • Column header view: Use a customizable column header view to differentiate headings for each column.
  • Footer view: Show or hide the footer view and customize the footer validation buttons (OK and Cancel).
  • Selection view: Highlight a selected item and customize the appearance of the highlight.
  • Picker modes: The .NET MAUI Picker control offers three display modes:
    • Default mode: Seamlessly integrates the Picker into your app’s layout.
    • Dialog mode: Presents the Picker in a pop-up dialog, offering a clean and focused interaction for users.
    • Relative dialog mode: Presents the Picker in a pop-up dialog with the dialog’s position relative to the Picker’s location within the app layout.
  • Picker interactions: Select an item through tap and scroll interactions.
  • Item template: Customize the appearance of Picker items using item template support.

Getting started with .NET MAUI Picker control

Follow these steps to integrate the .NET MAUI Picker control into your app:

  1. First, create a new .NET MAUI app in Visual Studio.
  2. Syncfusion .NET MAUI components are available in the NuGet Gallery. To add the SfPicker to your project, open the NuGet package manager in Visual Studio, and search for Syncfusion.Maui.Picker, then install it.
  3. The Syncfusion.Maui.Core NuGet is a dependent package for all Syncfusion .NET MAUI controls. In the MauiProgram.cs file, register the handler for Syncfusion core.
    MauiProgram.cs
    using Syncfusion.Maui.Core.Hosting;
    public static class MauiProgram
    {
       public static MauiApp CreateMauiApp()
       {
          var builder = MauiApp.CreateBuilder();
          builder.ConfigureSyncfusionCore();
       }
    }
  1. Finally, import the control namespace Syncfusion.Maui.Picker in XAML or C# code and then initialize the Picker control.
    Refer to the following code to initialize the .NET MAUI Picker control and add items to it.
    MainPage.xaml
    <ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
                 xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
                 xmlns:picker="clr-namespace:Syncfusion.Maui.Picker;assembly=Syncfusion.Maui.Picker"
                 x:Class="PickerMAUISample.MainPage">
     <Frame HasShadow="False" CornerRadius="5" HorizontalOptions="Center" VerticalOptions="Center" Margin="0" Padding="0" WidthRequest="250" BorderColor="LightGray" HeightRequest="330">
      <picker:SfPicker>
       <picker:SfPicker.HeaderView>
        <picker:PickerHeaderView Height="50" Text="Select a color" Background="#6750A4" >
         <picker:PickerHeaderView.TextStyle>
          <picker:PickerTextStyle FontSize="15" TextColor="White"/>
         </picker:PickerHeaderView.TextStyle>
        </picker:PickerHeaderView>
       </picker:SfPicker.HeaderView>
       <picker:SfPicker.Columns>
        <picker:PickerColumn SelectedIndex="4">
         <picker:PickerColumn.ItemsSource>
          <x:Array Type="{x:Type x:String}" >
           <x:String>Pink</x:String>
           <x:String>Green</x:String>
           <x:String>Blue</x:String>
           <x:String>Yellow</x:String>
           <x:String>Orange</x:String>
           <x:String>Purple</x:String>
           <x:String>SkyBlue</x:String>
           <x:String>PaleGreen</x:String>
           <x:String>Gray</x:String>
           <x:String>LiteGreen</x:String>
           <x:String>Brown</x:String>
          </x:Array>
         </picker:PickerColumn.ItemsSource>
        </picker:PickerColumn>
       </picker:SfPicker.Columns>
      </picker:SfPicker>
     </Frame>
    </ContentPage>

Note: For more details, refer to the .NET MAUI Picker control documentation.

Date Picker

The new .NET MAUI Date Picker (SfDatePicker) control allows you to select a date from a list of dates, providing a seamless and highly customizable solution to enhance the user experience.

.NET MAUI Date Picker
.NET MAUI Date Picker

Key features

The key features of the .NET MAUI Date Picker control are as follows:

  • Header view: Display and customize the header text.
  • Column header view: Customize all the column header views and their text.
  • Footer view: Show or hide the footer view and customize the footer validation buttons (OK and Cancel).
  • Selection view: Highlight the selected date and customize the appearance of the highlight.
  • Picker modes: The .NET MAUI Date Picker control offers three display modes:
    • Default mode: Seamlessly integrates the Date Picker into your app’s layout.
    • Dialog mode: Presents the Date Picker in a pop-up dialog, offering a clean and focused interaction for users.
    • Relative dialog mode: Presents the Date Picker in a pop-up dialog with the dialog’s position relative to the picker’s location within the app layout.
  • Picker interactions: You can select an item through tap and scroll interactions.
  • Date formats: Offers eight predefined formats to represent the values of dates in different string formats.
  • Date restriction: Restrict date selections to a specified range, ensuring users choose dates within the desired minimum and maximum dates.
  • Intervals: The date values can be populated individually with intervals for days, months, and years.

Getting started with .NET MAUI Date Picker control

Follow these steps to integrate the .NET MAUI Date Picker control into your app:

  1. After creating a .NET MAUI app, open the NuGet package manager in Visual Studio, and search for Syncfusion.Maui.Picker, and then install it.
  2. Now, import the control namespace Syncfusion.Maui.Picker in XAML or C# code and then initialize the SfDatePicker control.
    Refer to the following code to initialize the .NET MAUI Date Picker control and add items to it.

    MainPage.xaml

    <ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
                 xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
                 xmlns:picker="clr-namespace:Syncfusion.Maui.Picker;assembly=Syncfusion.Maui.Picker"
                 x:Class="PickerMAUISample.MainPage">
     <Frame HasShadow="False" CornerRadius="5" HorizontalOptions="Center" VerticalOptions="Center" Margin="0" Padding="0" WidthRequest="300" BorderColor="LightGray" HeightRequest="370">
      <picker:SfDatePicker HeightRequest="370">
       <picker:SfDatePicker.HeaderView>
        <picker:PickerHeaderView Height="50" Background="#6750A4" Text="Select a Date">
         <picker:PickerHeaderView.TextStyle>
          <picker:PickerTextStyle TextColor="White" FontSize="15" />
         </picker:PickerHeaderView.TextStyle>
        </picker:PickerHeaderView>
       </picker:SfDatePicker.HeaderView>
      </picker:SfDatePicker>
     </Frame>
    </ContentPage>

Note: For more details, refer to the .NET MAUI Date Picker control documentation.

Time Picker

The .NET MAUI Time Picker (SfTimePicker) control enables users to select a time from a list of times, offering a seamless and highly customizable solution to enhance the user experience.

.NET MAUI Time Picker
.NET MAUI Time Picker

Key features

The key features of the .NET MAUI Time Picker control are as follows:

  • Header view: Display and customize the header text.
  • Column header view: Customize all column header views and their text.
  • Footer view: Show or hide the footer view and customize the footer validation buttons (OK and Cancel).
  • Selection view: Highlight the selected time and customize the appearance of the highlight.
  • Picker modes: The .NET MAUI Time Picker control offers three display modes:
    • Default mode: Seamlessly integrates the Time Picker into your app’s layout.
    • Dialog mode: Presents the Time Picker in a pop-up dialog, offering a clean and focused interaction for users.
    • Relative dialog mode: Positions the Time Picker’s pop-up dialog relative to the picker’s location within the app layout.
  • Picker interactions: You can select an item through tap and scroll interactions.
  • Time formats: Offers nine predefined formats to represent the values of the times in different string formats, enhancing flexibility and usability.
  • Intervals: Time values can be populated individually with intervals for hours, minutes, and seconds, providing fine-grained control over time selection.

Getting started with the .NET MAUI Time Picker control

Follow these steps to integrate the .NET MAUI Time Picker control in your app:

  1. After creating a new .NET MAUI app, open the NuGet package manager in Visual Studio, search for Syncfusion.Maui.Picker, and then install it.
  2. Now, import the control namespace Syncfusion.Maui.Picker in XAML or C# code and then initialize the SfTimePicker control.

    Refer to the following code to initialize the .NET MAUI Time Picker control and add items to it.

    MainPage.xaml

    <ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
                 xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
                 xmlns:picker="clr-namespace:Syncfusion.Maui.Picker;assembly=Syncfusion.Maui.Picker"
                 x:Class="PickerMAUISample.MainPage">
     <Frame HasShadow="False" CornerRadius="5" HorizontalOptions="Center" VerticalOptions="Center" Margin="0" Padding="0" WidthRequest="300" BorderColor="LightGray" HeightRequest="370">
      <picker:SfTimePicker HeightRequest="370">
       <picker:SfTimePicker.HeaderView>
        <picker:PickerHeaderView Height="50" Background="#6750A4" Text="Select a Time">
         <picker:PickerHeaderView.TextStyle>
          <picker:PickerTextStyle TextColor="White" FontSize="15" />
         </picker:PickerHeaderView.TextStyle>
        </picker:PickerHeaderView>
       </picker:SfTimePicker.HeaderView>
      </picker:SfTimePicker>
     </Frame>
    </ContentPage>

Note: For more details, refer to the .NET MAUI Time Picker control documentation.

Date Time Picker

The .NET MAUI Date Time Picker (SfDateTimePicker) control enables you to select a date-time value from a list of dates and times, offering a seamless and highly customizable solution to enhance the user experience.

.NET MAUI Date Time Picker
.NET MAUI Date Time Picker

Key features

The key features of the .NET MAUI Date Time Picker control are as follows:

  • Header view: Display and customize the header text and its selection.
  • Column header view: Customize all column header views and their text.
  • Footer view: Show or hide the footer view and customize the footer validation buttons (OK and Cancel).
  • Selection view: Highlight the selected date-time and customize the appearance of the highlight.
  • Picker modes: The .NET MAUI Date Time Picker control offers three display modes:
    • Default mode: Seamlessly integrates the Date Time Picker into your app’s layout.
    • Dialog Mode: Presents the Date Time Picker in a pop-up dialog, offering a clean and focused interaction for users.
    • Relative dialog mode: Positions the Date Time Picker’s pop-up dialog relative to the picker’s location within the app layout.
  • Picker interactions: You can select an item through tap and scroll interactions.
  • Date formats: Offers eight predefined formats to represent the values of the dates in different string formats.
  • Time formats: Offers nine predefined formats to represent the values of the times in different string formats, enhancing flexibility and usability.
  • Date restriction: Restrict date-time selections to a specified range, ensuring users choose date-times within the desired minimum and maximum date-time values.
  • Intervals: Date-time values can be populated individually with intervals for seconds, minutes, hours, days, months, and years.

Getting started with the .NET MAUI Date Time Picker control

Follow these steps to integrate the .NET MAUI Date Time Picker control in your app:

  1. After creating a .NET MAUI app, open the NuGet package manager in Visual Studio, and search for Syncfusion.Maui.Picker, and then install it.
  2. Now, import the control namespace Syncfusion.Maui.Picker in XAML or C# code and initialize the SfDateTimePicker control.

    Refer to the following code to initialize the .NET MAUI Date Time Picker control and add items to it.

    MainPage.xaml

    <ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
                 xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
                 xmlns:picker="clr-namespace:Syncfusion.Maui.Picker;assembly=Syncfusion.Maui.Picker"
                 x:Class="PickerMAUISample.MainPage">
     <Frame HasShadow="False" CornerRadius="5" HorizontalOptions="Center" VerticalOptions="Center" Margin="0" Padding="0" WidthRequest="300" BorderColor="LightGray" HeightRequest="370">
      <picker:SfDateTimePicker HeightRequest="370" />
     </Frame>
    </ContentPage>

Note: For more details, refer to the .NET MAUI Date Time Picker control documentation.

Conclusion

Thanks for reading! In this blog, we’ve explored the features of the new .NET MAUI picker controls introduced in the 2023 Volume 3 release. Try these controls out and share your feedback in the comments section below.

If you are not a Syncfusion customer, try our 30-day free trial to see how our components can enhance your projects.

If you have any questions, you can contact us through our support forumsupport portal, or feedback portal. We are always happy to assist you!

Test Flight
App Center Badge
Google Play Store Badge
Microsoft Badge
Github Store Badge

Related Blogs

Tags:

Share this post:

Popular Now

Be the first to get updates

Subscribe RSS feed

Be the first to get updates

Subscribe RSS feed