-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainPage.xaml.cs
34 lines (25 loc) · 923 Bytes
/
MainPage.xaml.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
namespace SpellcheckRedraw;
public partial class MainPage : ContentPage
{
int count = 0;
public MainPage()
{
InitializeComponent();
}
private void autoTextCorrectionToggle_Toggled(object sender, ToggledEventArgs e)
{
// Handle the toggle switch state change here
bool isToggled = e.Value;
NoteEditor.Focus();
// Do something based on the state (isToggled)
NoteEditor.IsTextPredictionEnabled = isToggled;
NoteEditor.IsSpellCheckEnabled = isToggled;
if (isToggled == true)
NoteEditor.Keyboard = Keyboard.Default;
else
NoteEditor.Keyboard = Keyboard.Email;
//TODO: We need to trigger a refresh by resetting the contents of the editor
// Issue re: refresh/repaint of the Editor when toggling on/off
// https://github.com/dotnet/maui/issues/16894
}
}