Example #1
0
        /// <summary>
        /// The on Attached event Handler
        /// </summary>
        protected override void OnAttached()
        {
            base.OnAttached();

            this.viewModel = (IDiagramPortViewModel)this.AssociatedObject.DataContext;
            this.viewModel.WhenPositionIsUpdated += this.WhenPositionIsUpdated;
            this.DeterminePortConnectorRotation();
        }
Example #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DiagramPortShape"/> class.
 /// </summary>
 /// <param name="datacontext"/>
 /// The <see cref="IDiagramPortViewModel"/> data-context
 public DiagramPortShape(IDiagramPortViewModel datacontext)
 {
     this.DataContext = datacontext;
     this.InitializeComponent();
 }