/// <summary>
 /// Check whether a control has the default value for a property.
 /// </summary>
 /// <param name="control">The control to check.</param>
 /// <param name="property">The property to check.</param>
 /// <returns>
 /// True if the property has the default value; false otherwise.
 /// </returns>
 private static bool HasDefaultValue(Control control, DependencyProperty property)
 {
     Debug.Assert(control != null, "control should not be null!");
     Debug.Assert(property != null, "property should not be null!");
     return control.ReadLocalValue(property) == DependencyProperty.UnsetValue;
 }
 /// <summary>
 /// Check whether a control has the default value for a property.
 /// </summary>
 /// <param name="control">The control to check.</param>
 /// <param name="property">The property to check.</param>
 /// <returns>
 /// True if the property has the default value; false otherwise.
 /// </returns>
 private static bool HasDefaultValue(Control control, DependencyProperty property)
 {
     Debug.Assert(control != null, "control should not be null!");
     Debug.Assert(property != null, "property should not be null!");
     return(control.ReadLocalValue(property) == DependencyProperty.UnsetValue);
 }
Пример #3
0
 /// <summary>
 /// Checks whether a control has the default value for a property.
 /// </summary>
 /// <param name="control">The control to check.</param>
 /// <param name="property">The property to check.</param>
 /// <returns>True if the property has the default value; false otherwise.</returns>
 private static bool HasDefaultValue(Control control, DependencyProperty property)
 {
     return control.ReadLocalValue(property) == DependencyProperty.UnsetValue;
 }