예제 #1
0
 /// <summary>
 /// The GridContainer_MouseLeftButtonDown.
 /// </summary>
 /// <param name="sender">The sender<see cref="object"/>.</param>
 /// <param name="e">The e<see cref="MouseButtonEventArgs"/>.</param>
 internal void GridContainer_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
 {
     if (CanReposition)
     {
         //get the mouse's current position inside of the Window
         start = e.GetPosition(Application.Current.MainWindow);
         //get the current position of the element
         origin = new Point(tt.X, tt.Y);
         //capture the mouse on the element to indicate that it is in use
         GridViewStackPanel.CaptureMouse();
     }
 }
예제 #2
0
 /// <summary>
 /// The GridContainer_MouseLeftButtonUp.
 /// </summary>
 /// <param name="sender">The sender<see cref="object"/>.</param>
 /// <param name="e">The e<see cref="MouseButtonEventArgs"/>.</param>
 internal void GridContainer_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
 {
     GridViewStackPanel.ReleaseMouseCapture();
 }