Esempio n. 1
0
 protected override void OnColorPointVisualDragDelta(ColorPointVisual colorPointVisual, Point position)
 {
     base.OnColorPointVisualDragDelta(colorPointVisual, position);
     _dragOrginalPosition = new Point(_dragOrginalPosition.X + position.X, _dragOrginalPosition.Y + position.Y);
     //Debug.WriteLine(_dragOrginalPosition.X + "   " + _dragOrginalPosition.Y);
     colorPointVisual.ColorPoint.HsvColor = GetColor(_dragOrginalPosition, colorPointVisual.ColorPoint.HsvColor);
 }
 /// <summary>
 /// 将 DragDeltaCommand 依赖项属性的值设置为指定元素。
 /// </summary>
 /// <param name="obj">The element on which to set the property value.</param>
 /// <param name="value">The property value to set.</param>
 public static void SetDragDeltaCommand(ColorPointVisual obj, ICommand value)
 {
     obj.SetValue(DragDeltaCommandProperty, value);
 }
 /// <summary>
 //  从指定元素获取 DragDeltaCommand 依赖项属性的值。
 /// </summary>
 /// <param name="obj">The element from which the property value is read.</param>
 /// <returns>DragDeltaCommand 依赖项属性的值</returns>
 public static ICommand GetDragDeltaCommand(ColorPointVisual obj)
 {
     return((ICommand)obj.GetValue(DragDeltaCommandProperty));
 }
Esempio n. 4
0
 protected override void OnColorPointVisualDragStarted(ColorPointVisual colorPointVisual, Point position)
 {
     base.OnColorPointVisualDragStarted(colorPointVisual, position);
     _dragOrginalPosition = position;
 }
 public DragDeltaCommandParameter(ColorPointVisual colorPointVisual, Point translation)
 {
     ColorPointVisual = colorPointVisual;
     Translation      = translation;
 }
 public DragStartedCommandParameter(ColorPointVisual colorPointVisual, Point position)
 {
     ColorPointVisual = colorPointVisual;
     Position         = position;
 }
Esempio n. 7
0
 protected virtual void OnColorPointVisualDragDelta(ColorPointVisual colorPointVisual, Point position)
 {
 }
Esempio n. 8
0
 protected virtual void OnColorPointVisualDragStarted(ColorPointVisual colorPointVisual, Point position)
 {
 }