CodePlexProject Hosting for Open Source Software
How can I set programatically the binding to a property. I have an tabItem (created dynamically) and I want to set the binding to its "IsEnabled" property in code. I have the boolean property already in the viewModel. I know I have to use SetAttach
method (from Message class), but I am not sure what how the second param must be structured. Thanks.
var new tab = new TabItem();
Message.SetAttach(newTab, "What should be here");
// bool property in viewModel -> IsOtherEnabled.
If you are just trying to set a regular binding, you would do something like this:
var binding = new Binding("IsOtherEnabled");
Message.SetAttach is for attaching Actions.
Are you sure you want to delete this post? You will not be able to recover it later.
Are you sure you want to delete this thread? You will not be able to recover it later.