Esempio n. 1
0
 protected virtual void Button_MouseEnter(object sender, MouseEventArgs e)
 {
     if (sender is Button b)
     {
         deselectButton(highlightedButton);
         highlightedButton = b;
         if (b.FindName("highlightUnderline") is Rectangle r)
         {
             r.Visibility = Visibility.Visible;
         }
         if (b.FindName("toolIcon") is Image img)
         {
             img.Opacity = 1;
         }
         ToolMouseOver?.Invoke(sender, b.DataContext as GenericWindow);
     }
 }
Esempio n. 2
0
        protected virtual void Button_MouseEnter(object sender, MouseEventArgs e)
        {
            Button b = sender as Button;

            if (b != null)
            {
                deselectButton(highlightedButton);
                highlightedButton = b;
                Rectangle r = b.FindName("highlightUnderline") as Rectangle;
                if (r != null)
                {
                    r.Visibility = Visibility.Visible;
                }
                Image img = b.FindName("toolIcon") as Image;
                if (img != null)
                {
                    img.Opacity = 1;
                }
                ToolMouseOver?.Invoke(sender, b.DataContext as GenericWindow);
            }
        }
 protected override void Button_MouseEnter(object sender, MouseEventArgs e)
 {
     base.Button_MouseEnter(sender, e);
     ToolMouseOver?.Invoke(sender, (sender as Button)?.DataContext as Tool);
 }