I am using Visual studio 2012 and I am trying to bind the textbox.isenable
to static property static bool enable_disable
I am using the new feature of wpf4.5 and define static event StaticPropertyChanged
and write in the XMAL
TextBox IsEnable="{Binding Path=(local:my_class.enable_disable)}" />
The problem is the application runs fine and the binding with notify of property changing run in correct way but the XMAL process complains from error that enable_disable
is not dependency property and show markup invalid and I can't edit anything in UI.
I don't understand how the application and binding runs but the XMAL process has an error?
i know that
IsEnable="{Binding source ={x:static local:my_class.enable_disable)}"
will work but the StaticPropertyChanged event = null but with
my first solution work well with notify about changed property but why XMAL process has an error? how as it's new WPF feature provided by WPF 4.5?