How to set the style programmatically June 11, 2023 by Tarik In the code-behind file of the control, try: this.Style = Resources["ResourceName"] as Style;