Skip to content

Commit e0ba626

Browse files
committed
Bring back the old GridSplitter
1 parent 8f09144 commit e0ba626

16 files changed

+1471
-27
lines changed
Lines changed: 153 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,153 @@
1+
namespace Files.App.Controls
2+
{
3+
/// <summary>
4+
/// Represents the control that redistributes space between columns or rows of a Grid control.
5+
/// </summary>
6+
public partial class GridSplitter
7+
{
8+
/// <summary>
9+
/// Enum to indicate whether GridSplitter resizes Columns or Rows
10+
/// </summary>
11+
public enum GridResizeDirection
12+
{
13+
/// <summary>
14+
/// Determines whether to resize rows or columns based on its Alignment and
15+
/// width compared to height
16+
/// </summary>
17+
Auto,
18+
19+
/// <summary>
20+
/// Resize columns when dragging Splitter.
21+
/// </summary>
22+
Columns,
23+
24+
/// <summary>
25+
/// Resize rows when dragging Splitter.
26+
/// </summary>
27+
Rows
28+
}
29+
30+
/// <summary>
31+
/// Enum to indicate what Columns or Rows the GridSplitter resizes
32+
/// </summary>
33+
public enum GridResizeBehavior
34+
{
35+
/// <summary>
36+
/// Determine which columns or rows to resize based on its Alignment.
37+
/// </summary>
38+
BasedOnAlignment,
39+
40+
/// <summary>
41+
/// Resize the current and next Columns or Rows.
42+
/// </summary>
43+
CurrentAndNext,
44+
45+
/// <summary>
46+
/// Resize the previous and current Columns or Rows.
47+
/// </summary>
48+
PreviousAndCurrent,
49+
50+
/// <summary>
51+
/// Resize the previous and next Columns or Rows.
52+
/// </summary>
53+
PreviousAndNext
54+
}
55+
56+
/// <summary>
57+
/// Enum to indicate the supported gripper cursor types.
58+
/// </summary>
59+
public enum GripperCursorType
60+
{
61+
/// <summary>
62+
/// Change the cursor based on the splitter direction
63+
/// </summary>
64+
Default = -1,
65+
66+
/// <summary>
67+
/// Standard Arrow cursor
68+
/// </summary>
69+
Arrow,
70+
71+
/// <summary>
72+
/// Standard Cross cursor
73+
/// </summary>
74+
Cross,
75+
76+
/// <summary>
77+
/// Standard Custom cursor
78+
/// </summary>
79+
Custom,
80+
81+
/// <summary>
82+
/// Standard Hand cursor
83+
/// </summary>
84+
Hand,
85+
86+
/// <summary>
87+
/// Standard Help cursor
88+
/// </summary>
89+
Help,
90+
91+
/// <summary>
92+
/// Standard IBeam cursor
93+
/// </summary>
94+
IBeam,
95+
96+
/// <summary>
97+
/// Standard SizeAll cursor
98+
/// </summary>
99+
SizeAll,
100+
101+
/// <summary>
102+
/// Standard SizeNortheastSouthwest cursor
103+
/// </summary>
104+
SizeNortheastSouthwest,
105+
106+
/// <summary>
107+
/// Standard SizeNorthSouth cursor
108+
/// </summary>
109+
SizeNorthSouth,
110+
111+
/// <summary>
112+
/// Standard SizeNorthwestSoutheast cursor
113+
/// </summary>
114+
SizeNorthwestSoutheast,
115+
116+
/// <summary>
117+
/// Standard SizeWestEast cursor
118+
/// </summary>
119+
SizeWestEast,
120+
121+
/// <summary>
122+
/// Standard UniversalNo cursor
123+
/// </summary>
124+
UniversalNo,
125+
126+
/// <summary>
127+
/// Standard UpArrow cursor
128+
/// </summary>
129+
UpArrow,
130+
131+
/// <summary>
132+
/// Standard Wait cursor
133+
/// </summary>
134+
Wait
135+
}
136+
137+
/// <summary>
138+
/// Enum to indicate the behavior of window cursor on grid splitter hover
139+
/// </summary>
140+
public enum SplitterCursorBehavior
141+
{
142+
/// <summary>
143+
/// Update window cursor on Grid Splitter hover
144+
/// </summary>
145+
ChangeOnSplitterHover,
146+
147+
/// <summary>
148+
/// Update window cursor on Grid Splitter Gripper hover
149+
/// </summary>
150+
ChangeOnGripperHover
151+
}
152+
}
153+
}

0 commit comments

Comments
 (0)