private static void SearchTextChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { DecoratedTextBox dt = d as DecoratedTextBox; if (dt != null) { dt.UpdateDecorations(); } }
private static void HiddenCharsChanged(DependencyObject depObj, DependencyPropertyChangedEventArgs args) { DecoratedTextBox dt = depObj as DecoratedTextBox; if (dt != null) { dt.UpdateDecorations(); } }
private static void TextChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { DecoratedTextBox dt = d as DecoratedTextBox; if (dt != null) { dt.PlaceholderVisibility = string.IsNullOrEmpty(e.NewValue as string) ? Visibility.Visible : Visibility.Collapsed; dt.IsEditing = true; } }