Methods

The TemplatedPicker for .NET MAUI allows you to clear the selected value through its ClearSelection method.

  1. Define the TemplatedPicker:

    <StackLayout>
      <Button Clicked="OnClearSelectionClicked" Text="clear selection"/>
      <telerik:RadTemplatedPicker x:Name="picker">
          <telerik:RadTemplatedPicker.SelectorTemplate>
              <ControlTemplate>
                  <telerik:RadCalendar SelectedDate="{TemplateBinding SelectedValue, Mode=TwoWay}"/>
              </ControlTemplate>
          </telerik:RadTemplatedPicker.SelectorTemplate>
      </telerik:RadTemplatedPicker>
    </StackLayout>
    
  2. Clear the selection inside the button click event:

    private void OnClearSelectionClicked(object sender, EventArgs e)
    {
    this.picker.ClearSelection();
    }
    
  3. Add the following namespace:

    xmlns:telerik="http://schemas.telerik.com/2022/xaml/maui"
    

See Also

In this article
Not finding the help you need?