SearchBar Spell Check on Windows

Download Sample Download the sample

This Universal Windows Platform platform-specific enables a SearchBar to interact with the spell check engine. It's consumed in XAML by setting the SearchBar.IsSpellCheckEnabled attached property to a boolean value:

<ContentPage ...
        <SearchBar ... windows:SearchBar.IsSpellCheckEnabled="true" />

Alternatively, it can be consumed from C# using the fluent API:

using Xamarin.Forms.PlatformConfiguration;
using Xamarin.Forms.PlatformConfiguration.WindowsSpecific;


The SearchBar.On<Windows> method specifies that this platform-specific will only run on the Universal Windows Platform. The SearchBar.SetIsSpellCheckEnabled method, in the Xamarin.Forms.PlatformConfiguration.WindowsSpecific namespace, turns the spell checker on and off. In addition, the SearchBar.SetIsSpellCheckEnabled method can be used to toggle the spell checker by calling the SearchBar.GetIsSpellCheckEnabled method to return whether the spell checker is enabled:


The result is that text entered into the SearchBar can be spell checked, with incorrect spellings being indicated to the user:

SearchBar spell check platform-specific


The SearchBar class in the Xamarin.Forms.PlatformConfiguration.WindowsSpecific namespace also has EnableSpellCheck and DisableSpellCheck methods that can be used to enable and disable the spell checker on the SearchBar, respectively.