T
Todd Beaulieu
I have a "Save Changes" button on the form. I'm binding its IsEnabled
property to a property of the object that I'm dealing with. When I connect
the panel the buttons are in with an object (set the DataContext when the
user selects an object from a list), the buttons correctly evaluate. When I
tweak the property in the object, the notification is correctly evaluated and
the button's state changes as expected.
When I first load the form, however, the button is enabled. Setting the
DataContext to null on window load doesn't do the trick. Is there a way
around this, or do I need to set the property to Disabled and then use a data
trigger to flip it when the property goes positive? Surely, the simple
binding is attractive, but only if I can get to work.
property to a property of the object that I'm dealing with. When I connect
the panel the buttons are in with an object (set the DataContext when the
user selects an object from a list), the buttons correctly evaluate. When I
tweak the property in the object, the notification is correctly evaluated and
the button's state changes as expected.
When I first load the form, however, the button is enabled. Setting the
DataContext to null on window load doesn't do the trick. Is there a way
around this, or do I need to set the property to Disabled and then use a data
trigger to flip it when the property goes positive? Surely, the simple
binding is attractive, but only if I can get to work.