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)); }
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)])); }
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)); }
static BendModPanel() { ControlTemplate defaultTemplate = GetResource <ControlTemplate>("BendModDefaultTemplate"); TemplateProperty.OverrideMetadata(typeof(BendModPanel), new FrameworkPropertyMetadata(defaultTemplate)); }
static CustomersTreeFilterView() { ControlTemplate defaultTemplate = new CustomersTreeFilterViewTemplate(); TemplateProperty.OverrideMetadata(typeof(CustomersTreeFilterView), new System.Windows.FrameworkPropertyMetadata(defaultTemplate)); }
static MeteredSlider() { ControlTemplate defaultTemplate = GetResource <ControlTemplate>("MeteredSliderDefaultTemplate"); TemplateProperty.OverrideMetadata(typeof(MeteredSlider), new FrameworkPropertyMetadata(defaultTemplate)); }