Basically, I have a Grid with content that I want to reuse, the only difference being the functions called by clicking the buttons. I've added it to the ResourceDictionary, the plan being that I could simply set the content of a Page to that Grid, then override the function in the codebehind to do what I want. Unfortunately, I've run into a bit of a problem:
- The ResourceDictionary class won't compile without the functions in the .xaml being defined.
- My attempts to making the codebehind of the ResourceDictionary abstract/virtual just produce compiler errors (Missing partial modifier on declaration of type 'namespace.class'; another partial declaration of this type exists)
- Setting it as a partial class (What appears to be the only way to make the compiler happy) and having its functions set as virtual gets me an error of "no suitable method found to override"
Any suggestions would be helpful.