/// <summary> /// Delegate called when the position changed. /// </summary> /// <param name="pObject">The modified control.</param> /// <param name="pEventArgs">The event arguments.</param> private static void OnPositionChanged(DependencyObject pObject, DependencyPropertyChangedEventArgs pEventArgs) { AConnector lConnector = pObject as AConnector; if (lConnector != null) { lConnector.NotifyPositionChanged((Point)pEventArgs.OldValue, (Point)pEventArgs.NewValue); } }
/// <summary> /// Method called when the control template is applied. /// </summary> public override void OnApplyTemplate() { base.OnApplyTemplate(); // Getting the parts of the control. this.mConnector = this.GetTemplateChild(PART_CONNECTOR) as AConnector; if (this.mConnector == null) { throw new Exception("ConnectorPresenter control template not correctly defined."); } this.NotifiyTemplateApplied(); }
/// <summary> /// Initializes an instance of the <see cref="PortContainer"/> class. /// </summary> public ConnectorPresenter() { this.mConnector = null; }