Ejemplo n.º 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));
        }
Ejemplo n.º 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)]));
        }
Ejemplo n.º 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));
        }
Ejemplo n.º 5
0
        static BendModPanel()
        {
            ControlTemplate defaultTemplate = GetResource <ControlTemplate>("BendModDefaultTemplate");

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

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

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