Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
815
Creating a style from codebehind
posted

Ok, so I am starting to get a hang of WPF by now. 

What I can't figure out yet is how to create a style dynamically from my .cs file. I can create the style, I can create the setters, but I can't attach the setters to the style. 

Can someone please provide some working code for that?

 

Thank you.