Beispiel #1
0
        /// <summary>
        /// Handles changes to the Format property.
        /// </summary>
        /// <param name="d">
        /// The <see cref="DependencyObject"/> on which
        /// the property has changed value.
        /// </param>
        /// <param name="e">
        /// Event data that is issued by any event that
        /// tracks changes to the effective value of this property.
        /// </param>
        private static void OnFormatChanged(
            DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            ValidTextBoxFormats oldFormat = (ValidTextBoxFormats)e.OldValue;
            ValidTextBoxFormats newFormat = (ValidTextBoxFormats)d.GetValue(FormatProperty);

            SetupAndValidate((TextBox)d);
        }
 /// <summary>
 /// Sets the Format property. This dependency property
 /// indicates the formats to validate for.
 /// </summary>
 public static void SetFormat(DependencyObject d, ValidTextBoxFormats value)
 {
     d.SetValue(FormatProperty, value);
 }
		/// <summary>
		/// Sets the Format property. This dependency property 
		/// indicates the formats to validate for.
		/// </summary>
		public static void SetFormat(DependencyObject d, ValidTextBoxFormats value)
		{
			d.SetValue(FormatProperty, value);
		}
 public static void SetFormat(DependencyObject d, ValidTextBoxFormats value)
 {
     if (DesignMode.DesignModeEnabled) return;
     d.SetValue(FormatProperty, value);
 }