Microsoft.Windows.Controls.Ribbon.RibbonButton.OnMouseLeftButtonDown C# (CSharp) Méthode

OnMouseLeftButtonDown() protected méthode

This override ensures that the base call doesn't cause the control to take keyboard focus. And it does so by temporarily coercing the FocusableProperty to false.
protected OnMouseLeftButtonDown ( System.Windows.Input.MouseButtonEventArgs e ) : void
e System.Windows.Input.MouseButtonEventArgs
Résultat void
        protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)
        {
            try
            {
                try
                {
                    CoerceFocusable = true;
                    CoerceValue(FocusableProperty);
                }
                finally
                {
                    CoerceFocusable = false;
                }

                base.OnMouseLeftButtonDown(e);
            }
            finally
            {
                CoerceValue(FocusableProperty);
            }
        }