/// <summary> /// Updates the term items source. /// </summary> /// <param name="sender">The DecoratorTextBox.</param> /// <param name="args">Dependency Property Changed Event Args.</param> private static void MatchingTermItemsSource_Changed(DependencyObject sender, DependencyPropertyChangedEventArgs args) { DecoratorTextBox decoratorTextBox = (DecoratorTextBox)sender; if (decoratorTextBox.termItemsControl != null) { decoratorTextBox.termItemsControl.ItemsSource = (IEnumerable)args.NewValue; } }
/// <summary> /// Updates the term selected member path. /// </summary> /// <param name="sender">The DecoratorTextBox.</param> /// <param name="args">Dependency Property Changed Event Args.</param> private static void MatchingTermIsSelectedMemberPath_Changed(DependencyObject sender, DependencyPropertyChangedEventArgs args) { DecoratorTextBox decoratorTextBox = (DecoratorTextBox)sender; if (decoratorTextBox.termItemsControl != null) { decoratorTextBox.termItemsControl.IsSelectedMemberPath = (string)args.NewValue; } }
/// <summary> /// Sets the text in the text box. /// </summary> /// <param name="dependencyObject">The Decorator Text Box.</param> /// <param name="eventArgs">Dependency Property Changed Event Args.</param> private static void Text_Changed(DependencyObject dependencyObject, DependencyPropertyChangedEventArgs eventArgs) { DecoratorTextBox decoratorTextBox = (DecoratorTextBox)dependencyObject; decoratorTextBox.SetText(eventArgs.NewValue.ToString()); }