static InstrumentBase() { InitializeClassMetaData <InstrumentBase>(); TemplateProperty.SetDefaultValue <InstrumentBase>(WPF.Resources.InstrumentTemplate); ItemsPanelProperty.SetDefaultValue <InstrumentBase>(WPF.Resources.WrapPanelItemsTemplate); }
protected static void InitializeClassMetadata <T>(ControlTemplate template) where T : Module { DefaultStyleKeyProperty.OverrideMetadata(typeof(T), new FrameworkPropertyMetadata(typeof(T))); TemplateProperty.SetDefaultValue <T>(template); DescriptionProperty.SetDefaultValue <T>(typeof(T).Name); }