This should be a beginner's question to WPF but I can't find a simple answer. How do you get a handle on an object declared in WPF?
<Window x:Class="Testprj" xmlns:local="clr-namespace:Testprj">
<Window.Resources>
<local:CustomValidation x:Key="validationObj"/>
</Window.Resources>
</Window>
If I'm not mistaken, the above code is creating an instance of a "CustomValidation" object with the key "validationObj". Now, say each "CustomValidation" object has an instance variable called "myInstanceVar", how can I get the value of myInstanceVar from the code behind?
What I'm trying to do is something like (pseudocode):
validationObj.myInstanceVar
But it's unable to find even "validationObj". Any ideas?