private void internalChangeKeyboardFocusCallback( IntPtr caller, bool is_focused ) { ChangeKeyboardFocusEventArgs e = new ChangeKeyboardFocusEventArgs( is_focused ); this.HasKeyboardFocus = e.IsFocused; if ( e.IsFocused ) { this.Focus(); // The BrowseBack command reserves the backspace key. // Remove this gesture and restore when view loses keyboard focus. if ( ( browseBackGesture != null ) && NavigationCommands.BrowseBack.InputGestures.Contains( browseBackGesture ) ) NavigationCommands.BrowseBack.InputGestures.Remove( browseBackGesture ); } else if ( ( browseBackGesture != null ) && !NavigationCommands.BrowseBack.InputGestures.Contains( browseBackGesture ) ) NavigationCommands.BrowseBack.InputGestures.Add( browseBackGesture ); this.OnKeyboardFocusChanged( this, e ); CommandManager.InvalidateRequerySuggested(); }
private void internalChangeKeyboardFocusCallback( IntPtr caller, bool is_focused ) { ChangeKeyboardFocusEventArgs e = new ChangeKeyboardFocusEventArgs( is_focused ); this.HasKeyboardFocus = e.IsFocused; this.OnKeyboardFocusChanged( this, e ); }
/// <summary> /// Raises the <see cref="KeyboardFocusChanged"/> event. /// </summary> protected virtual void OnKeyboardFocusChanged( object sender, ChangeKeyboardFocusEventArgs e ) { if ( KeyboardFocusChanged != null ) KeyboardFocusChanged( sender, e ); }
private void internalChangeKeyboardFocusCallback(IntPtr caller, bool is_focused) { ChangeKeyboardFocusEventArgs e = new ChangeKeyboardFocusEventArgs(this, is_focused); if (OnChangeKeyboardFocus != null) OnChangeKeyboardFocus(this, e); }