I have a custom control derived from Button:
class MyControl : Button{}
And suppose, this class is empty (has no members).
In t
For doing this completely in code this answer on another forum works
this.Style = new Style(GetType(), this.FindResource(typeof(System.Windows.Controls.Button)) as Style);