Skip to content

Commit be52635

Browse files
committed
Init
1 parent 6ac5414 commit be52635

File tree

5 files changed

+191
-191
lines changed

5 files changed

+191
-191
lines changed

src/Files.App.Controls/GridSplitter/GridSplitter.Data.cs

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

src/Files.App.Controls/GridSplitter/GridSplitter.Options.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public static readonly DependencyProperty ParentLevelProperty
6767
public static readonly DependencyProperty GripperCursorProperty =
6868
DependencyProperty.RegisterAttached(
6969
nameof(GripperCursor),
70-
typeof(InputSystemCursorShape?),
70+
typeof(GripperCursorType),
7171
typeof(GridSplitter),
7272
new PropertyMetadata(GripperCursorType.Default, OnGripperCursorPropertyChanged));
7373

src/Files.App.Controls/GridSplitter/GripperHoverWrapper.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,16 @@ namespace Files.App.Controls
88
{
99
internal class GripperHoverWrapper
1010
{
11-
private readonly GridSplitter.GridResizeDirection _gridSplitterDirection;
11+
private readonly GridResizeDirection _gridSplitterDirection;
1212

1313
private InputCursor _splitterPreviousPointer;
1414
private InputCursor _previousCursor;
15-
private GridSplitter.GripperCursorType _gripperCursor;
15+
private GripperCursorType _gripperCursor;
1616
private int _gripperCustomCursorResource;
1717
private bool _isDragging;
1818
private UIElement _element;
1919

20-
internal GridSplitter.GripperCursorType GripperCursor
20+
internal GripperCursorType GripperCursor
2121
{
2222
get
2323
{
@@ -50,7 +50,7 @@ internal int GripperCustomCursorResource
5050
/// <param name="gridSplitterDirection">GridSplitter resize direction</param>
5151
/// <param name="gripperCursor">GridSplitter gripper on hover cursor type</param>
5252
/// <param name="gripperCustomCursorResource">GridSplitter gripper custom cursor resource number</param>
53-
internal GripperHoverWrapper(UIElement element, GridSplitter.GridResizeDirection gridSplitterDirection, GridSplitter.GripperCursorType gripperCursor, int gripperCustomCursorResource)
53+
internal GripperHoverWrapper(UIElement element, GridResizeDirection gridSplitterDirection, GripperCursorType gripperCursor, int gripperCustomCursorResource)
5454
{
5555
_gridSplitterDirection = gridSplitterDirection;
5656
_gripperCursor = gripperCursor;
@@ -113,21 +113,21 @@ private void UpdateDisplayCursor()
113113
return;
114114
}
115115

116-
if (_gripperCursor == GridSplitter.GripperCursorType.Default)
116+
if (_gripperCursor == GripperCursorType.Default)
117117
{
118-
if (_gridSplitterDirection == GridSplitter.GridResizeDirection.Columns)
118+
if (_gridSplitterDirection == GridResizeDirection.Columns)
119119
{
120120
// Window.Current.CoreWindow.PointerCursor = GridSplitter.ColumnsSplitterCursor;
121121
}
122-
else if (_gridSplitterDirection == GridSplitter.GridResizeDirection.Rows)
122+
else if (_gridSplitterDirection == GridResizeDirection.Rows)
123123
{
124124
// Window.Current.CoreWindow.PointerCursor = GridSplitter.RowSplitterCursor;
125125
}
126126
}
127127
else
128128
{
129129
var inputSystemCursorShape = (InputSystemCursorShape)((int)_gripperCursor);
130-
if (_gripperCursor == GridSplitter.GripperCursorType.Custom)
130+
if (_gripperCursor == GripperCursorType.Custom)
131131
{
132132
if (_gripperCustomCursorResource > GridSplitter.GripperCustomCursorDefaultResource)
133133
{

0 commit comments

Comments
 (0)