Microsoft.Windows.Controls.Ribbon.RibbonButton.OnMouseLeftButtonDown C# (CSharp) Method

OnMouseLeftButtonDown() protected method

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
return void
        protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)
        {
            try
            {
                try
                {
                    CoerceFocusable = true;
                    CoerceValue(FocusableProperty);
                }
                finally
                {
                    CoerceFocusable = false;
                }

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