This may be more of a general silverlight question/issue, but here goes...
I have a property in my ViewModel... let's say it's ReplyButtonVisibility.
I have a button ReplyButton near the top of my page with its Visibility bound to that property. Works perfectly.
Now, in each row of the grid, I also have a button ReplyButton2 that I'd like to bind to the same VM property. I can't get it to work. I realize the DataContext of the grid is going to be its data source, so I don't expect to use the same binding as the ReplyButton that's not part of the grid.
So, I thought I'd be clever and use element binding to just bind the row button's Visibility to the Visibility of the top ReplyButton. No go. The row visibility of the buttons in the rows never changes.
So, I guess the first and maybe easiest question is why the visibility of the button in each row didn't update when bound to the Visibility property of the main ReplyButton (not in the grid)?
Secondly, is there a binding syntax that would allow me to get to the LayoutRoot's DataContext (the ViewModel) from within the row?
I have a property in my ViewModel... let's say it's ReplyButtonVisibility.
I have a button ReplyButton near the top of my page with its Visibility bound to that property. Works perfectly.
Now, in each row of the grid, I also have a button ReplyButton2 that I'd like to bind to the same VM property. I can't get it to work. I realize the DataContext of the grid is going to be its data source, so I don't expect to use the same binding as the ReplyButton that's not part of the grid.
So, I thought I'd be clever and use element binding to just bind the row button's Visibility to the Visibility of the top ReplyButton. No go. The row visibility of the buttons in the rows never changes.
So, I guess the first and maybe easiest question is why the visibility of the button in each row didn't update when bound to the Visibility property of the main ReplyButton (not in the grid)?
Secondly, is there a binding syntax that would allow me to get to the LayoutRoot's DataContext (the ViewModel) from within the row?