Exemplo n.º 1
0
 private void ParentWindow_GotFocus(object?sender, Avalonia.Input.GotFocusEventArgs e)
 {
     if (window != null)
     {
         window.Topmost = true;
         window.Topmost = false;
     }
     IAvaloniaApplication.Instance.SetTopmostOneTime();
 }
Exemplo n.º 2
0
        private static void OnGotFocus(object?sender, Avalonia.Input.GotFocusEventArgs e)
        {
            if (sender is not AutoCompleteBox acb)
            {
                return;
            }

            acb.DropDownOpening -= CancelDropDownOpening;
        }
Exemplo n.º 3
0
 private void DangerousControl_GotFocus(object?sender, Avalonia.Input.GotFocusEventArgs e)
 {
     if (showDangerousWarning)
     {
         Focus(); // Remove focus from dangerous control by setting focus to SaveSlotInfoView
         MainWindowViewModel.Instance.ShowPopup("Editing your Hunter Rank or XP can be very dangerous and is a untested feature.\nI am not going to stop you, but keep in mind that if you screw this up it's on you.");
         showDangerousWarning = false;
     }
 }
Exemplo n.º 4
0
        private void AuthenticationView_GotFocus(object sender, Avalonia.Input.GotFocusEventArgs e)
        {
            if (e?.Source is Button)
            {
                if (((Button)e.Source).Name == "btnIdentitySelector")
                {
                    _txtPassword.Focus();
                    e.Handled = true;
                }

                if (((Button)e.Source).Name == "btnAdvancedFunctions")
                {
                    _txtAltID.Focus();
                    e.Handled = true;
                }
            }
        }
Exemplo n.º 5
0
 private void Window_GotFocus(object?sender, Avalonia.Input.GotFocusEventArgs e)
 {
     ParentWindow?.Focus();
 }