client/src/Iri.Modernisation.Controls/View/HeaderControl/ButtonHeaderControl.xaml.cs
changeset 30 644e3cd48034
parent 27 f292db96b050
equal deleted inserted replaced
29:5f8d275750e7 30:644e3cd48034
    15    
    15    
    16     public partial class ButtonHeaderControl : UserControl
    16     public partial class ButtonHeaderControl : UserControl
    17     {
    17     {
    18         public ButtonHeaderControl()
    18         public ButtonHeaderControl()
    19         {
    19         {
    20             _isMouseInside = false;
    20            
    21             InitializeComponent();
    21             InitializeComponent();
    22         }
    22         }
    23         private bool _isMouseInside;
    23 
    24         Point tempPoint = new Point();
    24         Point tempPoint = new Point();
    25 
    25 
    26         private void LayoutRoot_MouseMove(object sender, MouseEventArgs e)
    26         private void LayoutRoot_MouseMove(object sender, MouseEventArgs e)
    27         {
    27         {
    28             _isMouseInside = true;
    28           
    29             Point p = e.GetPosition(this);
    29             Point p = e.GetPosition(this);
    30             tempPoint.X = 1-  (p.X / ActualWidth);
    30             tempPoint.X = 1-  (p.X / ActualWidth);
    31             //tempPoint.Y = p.Y / ActualHeight;
    31             //tempPoint.Y = p.Y / ActualHeight;
    32             tempPoint.Y = 1 - (p.Y / ActualWidth); ;
    32             tempPoint.Y = 1 - (p.Y / ActualWidth); ;
    33             brushLight.Center = tempPoint;
    33             brushLight.Center = tempPoint;
    81             set { imgItem.Source = value; }
    81             set { imgItem.Source = value; }
    82         }
    82         }
    83 
    83 
    84         private void LayoutRoot_MouseEnter(object sender, MouseEventArgs e)
    84         private void LayoutRoot_MouseEnter(object sender, MouseEventArgs e)
    85         {
    85         {
    86             _isMouseInside = true;
    86            
    87             animEnter.Begin();
    87             animEnter.Begin();
    88         }
    88         }
    89 
    89 
    90         private void LayoutRoot_MouseLeave(object sender, MouseEventArgs e)
    90         private void LayoutRoot_MouseLeave(object sender, MouseEventArgs e)
    91         {
    91         {
    92             _isMouseInside = false;
    92         
    93             animLeave.Begin();
    93             animLeave.Begin();
    94 
    94 
    95         }
    95         }
    96 
    96 
    97         /// <summary>
    97         /// <summary>