Add IsDragAdornerEnabled prop to DIYGrid
This commit is contained in:
1 parent
53e9d90bf9
commit
aadbef2a99
1 file changed
+15
@@ -447,6 +447,11 @@ namespace mbts.ui.controls {
|
||||
},
|
||||
IsClipEnabled = true
|
||||
};
|
||||
_drag_rect_adorner.SetBinding(VisibilityProperty, new Binding {
|
||||
Path = new(DIYGrid.IsDragAdornerEnabledProperty),
|
||||
Source = _grid,
|
||||
Converter = new converters.BooleanToVisibilityConverter()
|
||||
});
|
||||
_drag_rect_adorner.Child.bind(Shape.FillProperty, _highlight_path, DIYGrid.SelectionHighlightBrushConverter, _grid);
|
||||
_drag_rect_adorner.Child.bind(Shape.StrokeProperty, _highlight_path, DIYGrid.SelectionHighlightOpaqueBrushConverter, _grid);
|
||||
_refresh_drag_rect();
|
||||
@@ -672,6 +677,16 @@ namespace mbts.ui.controls {
|
||||
(FontStretch)GetValue(FontStretchProperty),
|
||||
(FontFamily)GetValue(FontFamilyProperty));
|
||||
|
||||
#region IsDragAdornerEnabled
|
||||
public static readonly DependencyProperty IsDragAdornerEnabledProperty = WPFHelper.create_dp<bool, DIYGrid>(
|
||||
nameof(IsDragAdornerEnabled), true);
|
||||
|
||||
public bool IsDragAdornerEnabled {
|
||||
get => (bool)GetValue(IsDragAdornerEnabledProperty);
|
||||
set => SetValue(IsDragAdornerEnabledProperty, value);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region HeaderTotalSizeHack
|
||||
public static readonly DependencyProperty HeaderTotalSizeHackProperty = WPFHelper.create_dp<double, DIYGrid>(
|
||||
nameof(HeaderTotalSizeHack), (o, v) => o?.invalidate_column_layout());
|
||||
|
||||
Reference in new issue
Block a user