I have some UserControl
, It's DataContext
is binded to the ViewModel,
How to set a ViewModel's property from XAML
? Is it possible?
UPD : Sorry for being not very clear, I'm trying to get something like this : UserControl's DataContext is binded to ViewModel, I need to set ViewModel's property to something (let's say, UserControl's Width property). Is it possible?
UPD2: It seems to be not possible.I know about TwoWay binding mode, etc, thing I wanted to do - to set ViewModel's property to UserControl's one
This example should be very clear
<Set Property={Binding SomePropertyOnViewModel}
Value={Binding RelativeSource={RelativeSource Self},
Path=SomePropertyOnUserControl}>