I used this function to move my scroll, but this function is activated when I don't have a keyboard, I only want to use it when there is a keyboard, how can I solve this?
<Entry Placeholder="entry" Focused="EntryKeyboardHandle_Focused"
void EntryKeyboardHandle_Focused(object sender, FocusEventArgs e)
{
Device.BeginInvokeOnMainThread(async () =>
{
await Task.Delay(10);
await MainScroll.ScrollToAsync(0, 100, true);
});
}
I found this thread Xamarin forms check if keyboard is open or not
I have my entry with name "Entry
" and in my code behind Entry.Focused += keyboardService.KeyboardIsShown;
but I get this error.
The event 'IKeyboardService.KeyboardIsShown' can only appear on the left hand side of += or -=
KeyboardService
Then you use them withDependencyService
. – Alen.Toma