コード例 #1
0
        private static void SearchTextChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            DecoratedTextBox dt = d as DecoratedTextBox;

            if (dt != null)
            {
                dt.UpdateDecorations();
            }
        }
コード例 #2
0
        private static void HiddenCharsChanged(DependencyObject depObj, DependencyPropertyChangedEventArgs args)
        {
            DecoratedTextBox dt = depObj as DecoratedTextBox;

            if (dt != null)
            {
                dt.UpdateDecorations();
            }
        }
コード例 #3
0
        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;
            }
        }