public T GetValue <T>(CompositeObjectProperty prop) { if (!CanSet(prop)) { throw new System.Exception(); } prop = PropertyManager.Instance.GetVirtualProperty(GetType(), prop); var propVal = ValueStorage.Storage.GetValue(this, prop); if (propVal == CompositeObjectProperty.UnsetValue) { if (prop.Metadata is IPropertyMetadata <T> typedMetadata) { return(typedMetadata.DefaultValue); } else { return(default);
static Window() { CompositeObjectProperty.OverrideProperty <bool, Window>(IsVisibleProperty, false); CompositeObjectProperty.OverrideProperty <IBrush, Window>(BackgroundProperty,