File tree Expand file tree Collapse file tree 3 files changed +42
-5
lines changed
Expand file tree Collapse file tree 3 files changed +42
-5
lines changed Original file line number Diff line number Diff line change 1+ using System . Windows . Controls . Primitives ;
2+ using System . Windows . Input ;
3+
4+ namespace MaterialDesignThemes . Wpf
5+ {
6+ internal class GridViewColumnThumb : Thumb
7+ {
8+ public GridViewColumnThumb ( ) : base ( ) { }
9+
10+ protected override void OnMouseLeftButtonDown ( MouseButtonEventArgs e )
11+ {
12+ Mouse . OverrideCursor = Cursors . SizeWE ;
13+ base . OnMouseLeftButtonDown ( e ) ;
14+ }
15+
16+ protected override void OnMouseLeftButtonUp ( MouseButtonEventArgs e )
17+ {
18+ base . OnMouseLeftButtonUp ( e ) ;
19+ Mouse . OverrideCursor = null ;
20+ }
21+ }
22+ }
Original file line number Diff line number Diff line change 8888 <Setter .Value>
8989 <ControlTemplate TargetType =" GridViewColumnHeader" >
9090 <DockPanel >
91- <Thumb x : Name =" PART_HeaderGripper"
92- DockPanel.Dock=" Right"
93- Margin =" 0,0,-8,0"
94- Style =" {StaticResource MaterialDesignGridColumnHeaderGripper }" />
91+ <wpf : GridViewColumnThumb x : Name =" PART_HeaderGripper"
92+ DockPanel.Dock=" Right"
93+ Margin =" 0,0,-8,0"
94+ Style =" {StaticResource MaterialDesignGridViewColumnHeaderGripper }" />
9595 <Border x : Name =" HeaderBorder"
9696 Padding =" {TemplateBinding Padding}"
9797 BorderThickness =" {TemplateBinding BorderThickness}" >
Original file line number Diff line number Diff line change 11<ResourceDictionary xmlns =" http://schemas.microsoft.com/winfx/2006/xaml/presentation"
22 xmlns : x =" http://schemas.microsoft.com/winfx/2006/xaml"
3- xmlns : local =" clr-namespace:MaterialDesignTheme " >
3+ xmlns : local =" clr-namespace:MaterialDesignThemes.Wpf " >
44
55 <Style x : Key =" MaterialDesignThumb" TargetType =" {x:Type Thumb}" >
66 <Setter Property =" SnapsToDevicePixels" Value =" True" />
2929 <Setter Property =" Cursor" Value =" SizeWE" />
3030 </Style >
3131
32+ <Style x : Key =" MaterialDesignGridViewColumnHeaderGripper" TargetType =" {x:Type Thumb}" BasedOn =" {StaticResource MaterialDesignThumb}" >
33+ <Setter Property =" Width" Value =" 8" />
34+ <Setter Property =" Template" >
35+ <Setter .Value>
36+ <ControlTemplate TargetType =" {x:Type Thumb}" >
37+ <Border x : Name =" PART_Border"
38+ Cursor =" SizeWE"
39+ Padding =" {TemplateBinding Padding}"
40+ Background =" {TemplateBinding Background}"
41+ SnapsToDevicePixels =" {TemplateBinding SnapsToDevicePixels}" />
42+ </ControlTemplate >
43+ </Setter .Value>
44+ </Setter >
45+ </Style >
46+
3247</ResourceDictionary >
You can’t perform that action at this time.
0 commit comments