private static void OnTagChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { if (d is NewFeatureModalView) { NewFeatureModalView newFeatureModalView = (NewFeatureModalView)d; MessageBase <NewFeatureModalCloseWindowMessage, object> .Unregister(newFeatureModalView, new Action <NewFeatureModalCloseWindowMessage>(newFeatureModalView.DispatchClose), e.OldValue); MessageBase <NewFeatureModalCloseWindowMessage, object> .Register(newFeatureModalView, new Action <NewFeatureModalCloseWindowMessage>(newFeatureModalView.DispatchClose), e.NewValue); } }
void IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.NewFeatureModal = (NewFeatureModalView)target; this.NewFeatureModal.Closed += new EventHandler(this.NewFeatureModal_Closed); return; case 2: this.SecondaryButton = (Button)target; return; case 3: this.PrimaryButton = (Button)target; return; default: this._contentLoaded = true; return; } }