The XAML: "open bracket" controls:MyControl MyProperty="{Binding MyProperty, Mode=TwoWay}" "close bracket" MyControl class: public static readonly DependencyProperty MyPropertyProperty = DependencyProperty.Register("MyProperty", typeof(byte[]), typeof(MyControl), new PropertyMetadata(null) ); ViewModel property: byte [] MyProperty {get;set;} // Code on ViewModel that is run when the MenuItem is clicked: public void MyMenuItemFunction() { // Get the up-to-date value of MyProperty from MyControl here }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)