I'm designing a custom form in a WPF ResourceDictionary using a controltemplate so I can easily use the window later on. I'm designing it with Expression Blend and I'm stuck on getting the close, maximize and minimize buttons to work.
At first I wasn't able to access any of the events, however this stackoverflow question helped me with binding a class to the resourcedictionary. When I try to access the click event for the close, min and max buttons, I get in the code editor and the btn_Close eventhandler shows up.
When I try to compile it gives me the error "application.Resources doesn't contain a defition for close (...)" (Resources is the name of the class) (when I type "this." intellisense gives me many commands but not .Close)
I'm pretty sure all of the namespaces in both the class and XAML are right, how do I get this working properly? Or do I need to code this seperately for each form that uses this template?