コード例 #1
0
		private void HandleButtonPressEvent (object o, MouseButtonEventArgs args)
		{
			if (Command != null)
				Command.Execute (CommandParameter);

			RaiseClick ();
		}
コード例 #2
0
		private void HandleButtonPressEvent (object sender, MouseButtonEventArgs e)
		{
			IsDragging = true;

			MousePosition = PointToScreen (Mouse.GetPosition (this));

			Mouse.Captured = this;
		}
コード例 #3
0
		private void HandleMotionNotifyEvent (object sender, MouseButtonEventArgs e)
		{
			if (!IsDragging)
				return; 

			var previosMousePosition = MousePosition;

			MousePosition = PointToScreen (Mouse.GetPosition (this));

			RaiseDragDelta (MousePosition.X - previosMousePosition.X, MousePosition.Y - previosMousePosition.Y);
		}
コード例 #4
0
		private void HandleProviderButtonPressEvent (object o, MouseButtonEventArgs args)
		{
			RaisePreviewButtonPressEvent (args);
			RaiseButtonPressEvent (args);
		}
コード例 #5
0
		private void HandlePreviewButtonReleaseEvent (object sender, MouseButtonEventArgs e)
		{
			var point = Mouse.GetPosition (this);

			if (point.X < 0 || point.X > Width || point.Y < 0 || point.Y > Height)
				Close ();
		}
コード例 #6
0
ファイル: DocumentView.cs プロジェクト: Octavio/moro.fkalc
		private void HandleButtonPressEvent (object o, MouseButtonEventArgs args)
		{		
			if (Mouse.Device.TargetElement != canvas) {
				documentCursor.Visibility = Visibility.Collapsed;
				return;
			}

			var point = Mouse.GetPosition (this);
			documentCursor.X = Math.Round (point.X);
			documentCursor.Y = Math.Round (point.Y);
									
			documentCursor.Visibility = Visibility.Visible;
		}
コード例 #7
0
		private void RaiseButtonReleaseEvent (MouseButtonEventArgs args)
		{
			if (CapturedTargetElement == null)
				return;
			
			ButtonReleaseEvent.RaiseEvent (CapturedTargetElement, args);
		}
コード例 #8
0
		private void RaiseMotionNotifyEvent (MouseButtonEventArgs args)
		{
			if (CapturedTargetElement == null)
				return;

			MotionNotifyEvent.RaiseEvent (CapturedTargetElement, args);
		}
コード例 #9
0
		private void RaisePreviewButtonPressEvent (MouseButtonEventArgs args)
		{
			if (CapturedTargetElement == null)
				return;

			PreviewButtonPressEvent.RaiseEvent (CapturedTargetElement, args);
		}	
コード例 #10
0
		private void RaiseButtonPressEvent (MouseButtonEventArgs args)
		{
			if (TargetElement == null)
				return;

			ButtonPressEvent.RaiseEvent (TargetElement, args);
		}
コード例 #11
0
		private void HandleHeaderPreviewButtonPressEvent (object sender, MouseButtonEventArgs e)
		{
			IsSubmenuOpen = !IsSubmenuOpen;
		}
コード例 #12
0
		private void HandlePreviewButtonPressEvent (object o, MouseButtonEventArgs args)
		{
			OnPreviewButtonPressEvent (this, args);

			lookingFocus = true;
			
			if (!Focusable || Mouse.Device.TargetElement != this)
				return;

			Keyboard.Focus (this);
		}
コード例 #13
0
		private void RaiseMotionNotifyEvent (MouseButtonEventArgs args)
		{
			if (MotionNotifyEvent != null) {
				MotionNotifyEvent (this, args);
			}
		}
コード例 #14
0
		private void HandleButtonPressEvent (object sender, MouseButtonEventArgs e)
		{
			if (lookingFocus && Focusable) {
				Keyboard.Focus (this);
			}

			lookingFocus = false;

			OnButtonPressEvent (sender, e);	
		}
コード例 #15
0
		private void RaiseButtonReleaseEvent (MouseButtonEventArgs args)
		{
			if (ButtonReleaseEvent != null) {
				ButtonReleaseEvent (this, args);
			}
		}
コード例 #16
0
		private void RaisePreviewButtonPressEvent (MouseButtonEventArgs args)
		{
			if (PreviewButtonPressEvent != null) {
				PreviewButtonPressEvent (this, args);
			}
		}
コード例 #17
0
		protected virtual void OnMotionNotifyEvent (object o, MouseButtonEventArgs args)
		{
			RaiseMotionNotifyEvent (args);
		}
コード例 #18
0
		protected virtual void OnButtonReleaseEvent (object o, MouseButtonEventArgs args)
		{
			RaiseButtonReleaseEvent (args);
		}
コード例 #19
0
		protected virtual void OnPreviewButtonPressEvent (object o, MouseButtonEventArgs args)
		{
			RaisePreviewButtonPressEvent (args);
		}
コード例 #20
0
		private void HandleButtonReleaseEvent (object sender, MouseButtonEventArgs e)
		{
			IsDragging = false;
			Mouse.Captured = null;
		}
コード例 #21
0
		private void HandleButtonReleaseEvent (object sender, MouseButtonEventArgs e)
		{
			RaisePreviewButtonReleaseEvent (e);
			RaiseButtonReleaseEvent (e);
		}		
コード例 #22
0
		private void HandleMotionNotifyEvent (object o, MouseButtonEventArgs args)
		{
			var provider = providers.FirstOrDefault (p => p == o);
			
			if (provider == null)
				return;

			var root = Application.Current.GetRoot (provider.RootElement);

			if (root == null)
				return;

			var point = root.GerMousePosition ();
			
			TargetElement = VisualTreeHelper.HitTest (point, provider.RootElement);

			var eventArgs = new MouseButtonEventArgs ();

			RaisePreviewMotionNotifyEvent (eventArgs);
			RaiseMotionNotifyEvent (eventArgs);
		}
コード例 #23
0
		private void HandleButtonPressEvent (object o, MouseButtonEventArgs args)
		{
			RaiseClick ();
		}