/// <summary> /// /// </summary> /// <param name="propertyName"></param> public void resetToDefaultValue(String propertyName) { IList <DependencyProperty> props = WpfUtil.GetDependencyProperties(this); foreach (DependencyProperty dp in props) { if (propertyName != null && propertyName != dp.Name) { continue; } object defaultValue = dp.DefaultMetadata.DefaultValue; this.SetCurrentValue(dp, defaultValue); } }