As titled, I want to enable the a Button (that was disabled) when a row from DataGrid (so an object) is selected.
From what I read, WPF seems to have triggers for check when centain property change it can do centain thing?
But in Silverlight it seems I can only use GoToState instead. I tried to make two states: Selected and UnSelected. But the IsEnabled property for the Button it doesn’t seems being record from UnSelected state to Selected state…
And another problem is the only event that fits from DataGrid is SelectionChanged, but how do I ensure that the User does selected a Row?
If I do everything in code-behide I can check SelectionChangedEvent and enable the buttons, but is there anyway to do everything above with Expression Blend? I am trying to put everything in xaml as much as possible.
Thanks
Have you tried using ordinary Element binding? For example:
and an example of the converter:
All you have to do then is declare the converter in the static resources of either the page or the Button.