reassigning the miniob update button to the update_command property so select the row if it's not already selected

This commit is contained in:
Jake Norbut committed 2019-06-07 16:16:27 -05:00
1 parent 16eeddec7d
commit c5f7ee0ed3
1 file changed
+3 -3
@@ -1013,9 +1013,9 @@ namespace mbts.spark {
// kept in sync between those controls via a PlacementTarget.DataContext binding
update_button.SetBinding(Button.DataContextProperty, orderbook_vm_datacontext_binding);
//var row_vm_update_command_binding = new Binding(WPFHelper.join_binding_paths("DataContext", nameof(OrderBookRowVM.update_command)));
//row_vm_update_command_binding.RelativeSource = new RelativeSource(RelativeSourceMode.FindAncestor, typeof(MiniOrderBookRowView), 1);
//update_button.SetBinding(Button.CommandProperty, row_vm_update_command_binding);
var row_vm_update_command_binding = new Binding(WPFHelper.join_binding_paths("DataContext", nameof(OrderBookRowVM.update_command)));
row_vm_update_command_binding.RelativeSource = new RelativeSource(RelativeSourceMode.FindAncestor, typeof(MiniOrderBookRowView), 1);
update_button.SetBinding(Button.CommandProperty, row_vm_update_command_binding);
// update button is only visible for orders under the control of an algo
var update_button_visibility_binding = new Binding(WPFHelper.join_binding_paths("DataContext", nameof(OrderBookRowVM.root_algo_order_type))) {