Exemple #1
0
        static MeterControl()
        {
            ResourceDictionary dictionary = new ResourceDictionary {
                Source = new Uri("pack://application:,,,/Synth.WPF;component/Controls/ControlResources.xaml")
            };
            ControlTemplate defaultTemplate = (ControlTemplate)dictionary["MeterControlDefaultTemplate"];

            TemplateProperty.OverrideMetadata(typeof(MeterControl), new FrameworkPropertyMetadata(defaultTemplate));
        }
Exemple #2
0
 static LabelControl()
 {
     //DefaultStyleKeyProperty.OverrideMetadata(typeof(LabelControl), new FrameworkPropertyMetadata(typeof(LabelControl)));
     ResDict = new ResourceDictionary {
         Source = new Uri("WPFControlExt;component/LabelControl.res.xaml", UriKind.RelativeOrAbsolute)
     };
     LabelControlTemplate = (ControlTemplate)ResDict["LabelControlTemplate"];
     TemplateProperty.OverrideMetadata(typeof(LabelControl), new FrameworkPropertyMetadata(LabelControlTemplate));
 }
        static KeyboardShortcutBox()
        {
            var res = new ResourceDictionary()
            {
                Source = new Uri("pack://application:,,,/VolumeSwitch;component/View/Theme/KeyboardShortcutBoxTemplate.xaml", UriKind.Absolute)
            };

            TemplateProperty.OverrideMetadata(typeof(KeyboardShortcutBox), new FrameworkPropertyMetadata(res[typeof(KeyboardShortcutBox)]));
        }
Exemple #4
0
        static ViewElement()
        {
            var self = typeof(ViewElement);

            var template = new ControlTemplate(self);

            var contentPresenter = new FrameworkElementFactory(typeof(ContentPresenter));

            contentPresenter.SetValue(ContentPresenter.ContentSourceProperty, "View");

            template.VisualTree = contentPresenter;

            template.Seal();

            TemplateProperty.OverrideMetadata(self, new FrameworkPropertyMetadata(template));
        }
Exemple #5
0
        static BendModPanel()
        {
            ControlTemplate defaultTemplate = GetResource <ControlTemplate>("BendModDefaultTemplate");

            TemplateProperty.OverrideMetadata(typeof(BendModPanel), new FrameworkPropertyMetadata(defaultTemplate));
        }
Exemple #6
0
        static CustomersTreeFilterView()
        {
            ControlTemplate defaultTemplate = new CustomersTreeFilterViewTemplate();

            TemplateProperty.OverrideMetadata(typeof(CustomersTreeFilterView), new System.Windows.FrameworkPropertyMetadata(defaultTemplate));
        }
Exemple #7
0
        static MeteredSlider()
        {
            ControlTemplate defaultTemplate = GetResource <ControlTemplate>("MeteredSliderDefaultTemplate");

            TemplateProperty.OverrideMetadata(typeof(MeteredSlider), new FrameworkPropertyMetadata(defaultTemplate));
        }