コード例 #1
0
        private static object OnTextBoxTextCoerce(DependencyObject o, object baseValue)
        {
            MessageTextBox mtb = (MessageTextBox)o;

            mtb.UpdateIsBackgroundTextShown((string)baseValue);

            if (baseValue == null)
            {
                return(string.Empty);
            }

            return(baseValue);
        }
コード例 #2
0
        static private void IsBackgroundTextShownProperty_PropertyChanged(DependencyObject o, DependencyPropertyChangedEventArgs e)
        {
            MessageTextBox obj = (MessageTextBox)o;

            obj.OnIsBackgroundTextShownChanged(new PropertyChangedEventArgs <bool>((bool)e.OldValue, (bool)e.NewValue));
        }
コード例 #3
0
        static private void BackgroundTextProperty_PropertyChanged(DependencyObject o, DependencyPropertyChangedEventArgs e)
        {
            MessageTextBox obj = (MessageTextBox)o;

            obj.OnBackgroundTextChanged(new PropertyChangedEventArgs <string>((string)e.OldValue, (string)e.NewValue));
        }