c# - WPF share common property between controls -
i've 2 content controls how can share mutual property between them, illustration if select value combobox in first content control, how can sec command know it
<teleriknavigation:radtabitem header="1"> <stackpanel> <contentcontrol content="{binding egrpextractviewmodel.view}" /> </stackpanel> </teleriknavigation:radtabitem> <teleriknavigation:radtabitem header="2"> <contentcontrol content="{binding egrprightobjectviewmodel.view}" /> </teleriknavigation:radtabitem> thanks
you need utilize 2 way binding respond property changing in viewmodel.
<contentcontrol content="{binding egrprightobjectviewmodel.view,mode=twoway}" /> see msdn docs how respond changed properties: http://msdn.microsoft.com/en-us/library/ms743695(v=vs.110).aspx
c# wpf data-binding
No comments:
Post a Comment