Description
To be able to set the SetShowsCancelButton property for SearchBar on iOS, without the need to have custom handlers.
Public API Changes
<ContentPage ... xmlns:ios="clr-namespace:Microsoft.Maui.Controls.PlatformConfiguration.iOSSpecific;assembly=Microsoft.Maui.Controls"> <StackLayout> <SearchBar ios:SearchBar.ShowsCancelButton="False" Placeholder="Enter search term" /> ... </StackLayout> </ContentPage>
Intended Use-Case
There many cases where you simply do not want to show the "cancel" button. Currently this can be achieved using handlers
#if IOS SearchBarHandler.Mapper.AppendToMapping("CancelButtonColor", (handler, view) => { handler.PlatformView.SetShowsCancelButton(false, false); }); #endif
However, since many developers elect to disable it, it would be nice to have it readily available as a bindable property.
Description
To be able to set the SetShowsCancelButton property for SearchBar on iOS, without the need to have custom handlers.
Public API Changes
<ContentPage ... xmlns:ios="clr-namespace:Microsoft.Maui.Controls.PlatformConfiguration.iOSSpecific;assembly=Microsoft.Maui.Controls"> <StackLayout> <SearchBar ios:SearchBar.ShowsCancelButton="False" Placeholder="Enter search term" /> ... </StackLayout> </ContentPage>Intended Use-Case
There many cases where you simply do not want to show the "cancel" button. Currently this can be achieved using handlers
#if IOS SearchBarHandler.Mapper.AppendToMapping("CancelButtonColor", (handler, view) => { handler.PlatformView.SetShowsCancelButton(false, false); }); #endifHowever, since many developers elect to disable it, it would be nice to have it readily available as a bindable property.