In the code-behind file of the control, try:
this.Style = Resources["ResourceName"] as Style;
More Related Contents:
- WPF TemplateBinding vs RelativeSource TemplatedParent
- Can I use a different Template for the selected item in a WPF ComboBox than for the items in the dropdown part?
- What framework for MVVM should I use? [closed]
- How to create a semi transparent window in WPF that allows mouse events to pass through
- Disable Visual Studio 2015 extra debug option
- How to get controls in WPF to fill available space?
- What is the difference between x:Reference and ElementName?
- DropShadow for WPF Borderless Window
- Bubbling scroll events from a ListView to its parent
- Make WPF Image load async
- XAML Combine styles going beyond BasedOn?
- Difference between Visibility.Collapsed and Visibility.Hidden
- How to format number of decimal places in wpf using style/template?
- Finding the handle to a WPF window
- Dynamic filter of WPF combobox based on text input
- How to bind Close command to a button
- Why is Frame Rate in WPF Irregular and Not Limited To Monitor Refresh?
- How to autosize and right-align GridViewColumn data in WPF?
- WPF. Easiest way to move Image to (X,Y) programmatically?
- WPF Marquee Text Animation
- Advanced XAML Animation effects. Pulse, Marching ants, Rotations. Alerts
- Binding in WPF to element of array specified by property
- HorizontalAlignment=Stretch, MaxWidth, and Left aligned at the same time?
- How can I achieve a dashed or dotted border in WPF?
- Boolean CommandParameter in XAML
- How to access a WPF control located in a ControlTemplate?
- How can I specify letter spacing or kerning, in a WPF TextBox?
- Binding a ComboBox to an enum nested in a class
- How to show row-number in first column of WPF Datagrid
- WPF – How to create image button with template