Example #1
0
 private void Current_VisibilityChanged(SoftKeyboardEventArgs e)
 {
     if (e.IsVisible)
     {
         // do your things
     }
     else
     {
         // do your things
     }
 }
        // KeyboardService code
        private void KeyboardService_VisibilityChanged(object sender, SoftKeyboardEventArgs e)
        {
            // The OnGlobalLayout method is calledd multiple times, so we have to store the previous state
            // and only do anything if the keyboard visibility is changed
            if (isKeyboardVisible != e.IsVisible)
            {
                isKeyboardVisible = e.IsVisible;

                // Only has to be set when the keyboard becomes visible, because otherwise
                // the MainPage_SizeChanged is invoked earlier, so the canSetLayout is already changed
                if (e.IsVisible)
                {
                    canSetLayout = false;
                }
            }
        }
 private void Current_VisibilityChanged(SoftKeyboardEventArgs e)
 {
     LabelMessage.Text = $"KeyBoard is visible : {(e.IsVisible ? "Yes" : "No")}";
 }