void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.myShowNumberControl = ((CustomDependencyPropertyDemo.ShowNumberControl)(target)); return; } this._contentLoaded = true; }
public static void CurrentNumberChanged(DependencyObject depObj, DependencyPropertyChangedEventArgs e) { ShowNumberControl thisControl = (ShowNumberControl)depObj; thisControl.numberDisplay.Content = e.NewValue; }