diff --git a/src/client/spark/AW2/View/VolSurfaceCellView.xaml b/src/client/spark/AW2/View/VolSurfaceCellView.xaml index 9c8b775fe..ec3a9cdd7 100644 --- a/src/client/spark/AW2/View/VolSurfaceCellView.xaml +++ b/src/client/spark/AW2/View/VolSurfaceCellView.xaml @@ -78,7 +78,9 @@ + Visibility="Hidden" + TickDownCommand="{Binding TickDownCommand, RelativeSource={RelativeSource TemplatedParent}}" + TickUpCommand="{Binding TickUpCommand, RelativeSource={RelativeSource TemplatedParent}}"> (nameof(TickDownCommand)); + + public ICommand TickDownCommand { + get => GetValue(TickDownCommandProperty) as ICommand; + set => SetValue(TickDownCommandProperty, value); + } + #endregion + + #region TickUpCommand + public static readonly DependencyProperty TickUpCommandProperty = + WPFHelper.create_dp(nameof(TickUpCommand)); + + public ICommand TickUpCommand { + get => GetValue(TickUpCommandProperty) as ICommand; + set => SetValue(TickUpCommandProperty, value); + } + #endregion + #region IsDirty public static readonly DependencyPropertyKey IsDirtyPropertyKey = DependencyProperty.RegisterReadOnly(nameof(IsDirty), typeof(bool), typeof(VolSurfaceCellView), diff --git a/src/client/spark/AW2/ViewModel/Grid/VolSurfaceSimplifiedGridVM.cs b/src/client/spark/AW2/ViewModel/Grid/VolSurfaceSimplifiedGridVM.cs index 705a94fc7..871527959 100644 --- a/src/client/spark/AW2/ViewModel/Grid/VolSurfaceSimplifiedGridVM.cs +++ b/src/client/spark/AW2/ViewModel/Grid/VolSurfaceSimplifiedGridVM.cs @@ -92,6 +92,8 @@ namespace mbts.spark.VolSurface { Converter = ValueConverter.create(is_dirty => is_dirty ? BTSColors.UI.input_dirty_border.to_brush() : Brushes.Transparent) }); + view.SetBinding(VolSurfaceCellView.TickDownCommandProperty, new Binding(nameof(VolGridTickCellVM.tick_down_cmd))); + view.SetBinding(VolSurfaceCellView.TickUpCommandProperty, new Binding(nameof(VolGridTickCellVM.tick_up_cmd))); return view; } default: