private static object OnTextBoxTextCoerce(DependencyObject o, object baseValue) { MessageTextBox mtb = (MessageTextBox)o; mtb.UpdateIsBackgroundTextShown((string)baseValue); if (baseValue == null) { return(string.Empty); } return(baseValue); }
static private void IsBackgroundTextShownProperty_PropertyChanged(DependencyObject o, DependencyPropertyChangedEventArgs e) { MessageTextBox obj = (MessageTextBox)o; obj.OnIsBackgroundTextShownChanged(new PropertyChangedEventArgs <bool>((bool)e.OldValue, (bool)e.NewValue)); }
static private void BackgroundTextProperty_PropertyChanged(DependencyObject o, DependencyPropertyChangedEventArgs e) { MessageTextBox obj = (MessageTextBox)o; obj.OnBackgroundTextChanged(new PropertyChangedEventArgs <string>((string)e.OldValue, (string)e.NewValue)); }