예제 #1
0
        static InstrumentBase()
        {
            InitializeClassMetaData <InstrumentBase>();

            TemplateProperty.SetDefaultValue <InstrumentBase>(WPF.Resources.InstrumentTemplate);
            ItemsPanelProperty.SetDefaultValue <InstrumentBase>(WPF.Resources.WrapPanelItemsTemplate);
        }
예제 #2
0
        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);
        }