I have a usercontrol with one button in it. I want to set the text via a property getter setter using the INotifyPropertyChanged interface in code behind. I can get it to work if I set the DATACONTEXT in code behind in the CTOR like this : DataContext
= this; Everything works perfect.
But here's the problem. If I try to do this in xaml by defining an XMLNS which points to the folder this usercontrol is in, and then attempt to reference it as a resouce like this <local:XXXXXX <-------The XXXX which is the class name of
this control can't be found? Is that wierd? Can't a resource be itself? So that I can set the Datacontext in the XAML instead of code behind? I've tried to bind to relative source self, but cannot set the property (Event when I attempted
to created a dependency property)..... Just wondering how one sets up Datacontext to the same class?
View Complete Post