| 123456789101112131415161718192021222324252627 |
- using System.Windows.Controls;
- using System.Windows;
- using System.Windows.Input;
- namespace SHJX.Service.WorkFlowEdit
- {
- public class LinkThumb : Control
- {
- public LinkThumbKind Kind { get; set; }
- protected Point? MouseDownPoint { get; set; }
- protected override void OnMouseDown(MouseButtonEventArgs e)
- {
- if (e.ChangedButton == MouseButton.Left)
- {
- var link = this.DataContext as LinkBase;
- var view = VisualHelper.FindParent<DiagramView>(link);
- if (link != null && view != null)
- {
- MouseDownPoint = e.GetPosition(view);
- view.LinkTool.BeginDrag(MouseDownPoint.Value, link, this.Kind);
- e.Handled = true;
- }
- }
- }
- }
- }
|