void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.redButton = ((CustomUIControls.CustomButton)(target)); return; case 2: this.blueButton = ((CustomUIControls.CustomButton)(target)); return; case 3: this.greenButton = ((CustomUIControls.CustomButton)(target)); return; case 4: this.grayButton = ((CustomUIControls.CustomButton)(target)); return; case 5: this.yellowButton = ((CustomUIControls.CustomButton)(target)); return; case 6: this.searchDelayed = ((CustomUIControls.SearchTextBox)(target)); return; case 7: this.searchInstant = ((CustomUIControls.SearchTextBox)(target)); return; } this._contentLoaded = true; }
static void OnSearchEventTimeDelayChanged(DependencyObject o, DependencyPropertyChangedEventArgs e) { SearchTextBox stb = o as SearchTextBox; if (stb != null) { stb.searchEventDelayTimer.Interval = ((Duration)e.NewValue).TimeSpan; stb.searchEventDelayTimer.Stop(); } }