59 instantiations of SnapLine
System.Windows.Forms.Design (36)
System\Windows\Forms\Design\Behavior\ResizeBehavior.cs (8)
164
lines.Add(new
SnapLine
(SnapLineType.Bottom, loc.Y - 1));
167
lines.Add(new
SnapLine
(SnapLineType.Horizontal, loc.Y + _primaryControl.Margin.Bottom, SnapLine.MarginBottom, SnapLinePriority.Always));
172
lines.Add(new
SnapLine
(SnapLineType.Top, loc.Y));
175
lines.Add(new
SnapLine
(SnapLineType.Horizontal, loc.Y - _primaryControl.Margin.Top, SnapLine.MarginTop, SnapLinePriority.Always));
181
lines.Add(new
SnapLine
(SnapLineType.Right, loc.X - 1));
184
lines.Add(new
SnapLine
(SnapLineType.Vertical, loc.X + _primaryControl.Margin.Right, SnapLine.MarginRight, SnapLinePriority.Always));
189
lines.Add(new
SnapLine
(SnapLineType.Left, loc.X));
192
lines.Add(new
SnapLine
(SnapLineType.Vertical, loc.X - _primaryControl.Margin.Left, SnapLine.MarginLeft, SnapLinePriority.Always));
System\Windows\Forms\Design\ButtonBaseDesigner.cs (1)
99
snapLines.Add(new
SnapLine
(SnapLineType.Baseline, baseline, SnapLinePriority.Medium));
System\Windows\Forms\Design\ComboBoxDesigner.cs (1)
37
snapLines.Add(new
SnapLine
(SnapLineType.Baseline, baseline, SnapLinePriority.Medium));
System\Windows\Forms\Design\ControlCommandSet.cs (6)
480
lines.Add(new
SnapLine
(SnapLineType.Right, pt.X + primaryControl.Width - 1));
481
lines.Add(new
SnapLine
(SnapLineType.Vertical, pt.X + primaryControl.Width + primaryControl.Margin.Right, SnapLine.MarginRight, SnapLinePriority.Always));
488
lines.Add(new
SnapLine
(SnapLineType.Left, pt.X));
489
lines.Add(new
SnapLine
(SnapLineType.Vertical, pt.X - primaryControl.Margin.Left, SnapLine.MarginLeft, SnapLinePriority.Always));
501
lines.Add(new
SnapLine
(SnapLineType.Bottom, pt.Y + primaryControl.Height - 1));
502
lines.Add(new
SnapLine
(SnapLineType.Horizontal, pt.Y + primaryControl.Height + primaryControl.Margin.Bottom, SnapLine.MarginBottom, SnapLinePriority.Always));
System\Windows\Forms\Design\ControlDesigner.cs (8)
352
snapLines.Add(new
SnapLine
(SnapLineType.Top, 0, SnapLinePriority.Low));
353
snapLines.Add(new
SnapLine
(SnapLineType.Bottom, height - 1, SnapLinePriority.Low));
354
snapLines.Add(new
SnapLine
(SnapLineType.Left, 0, SnapLinePriority.Low));
355
snapLines.Add(new
SnapLine
(SnapLineType.Right, width - 1, SnapLinePriority.Low));
360
snapLines.Add(new
SnapLine
(SnapLineType.Horizontal, -margin.Top, SnapLine.MarginTop, SnapLinePriority.Always));
361
snapLines.Add(new
SnapLine
(SnapLineType.Horizontal, margin.Bottom + height, SnapLine.MarginBottom, SnapLinePriority.Always));
362
snapLines.Add(new
SnapLine
(SnapLineType.Vertical, -margin.Left, SnapLine.MarginLeft, SnapLinePriority.Always));
363
snapLines.Add(new
SnapLine
(SnapLineType.Vertical, margin.Right + width, SnapLine.MarginRight, SnapLinePriority.Always));
System\Windows\Forms\Design\DateTimePickerDesigner.cs (1)
31
snapLines.Add(new
SnapLine
(SnapLineType.Baseline, baseline, SnapLinePriority.Medium));
System\Windows\Forms\Design\LabelDesigner.cs (1)
62
snapLines.Add(new
SnapLine
(SnapLineType.Baseline, baseline, SnapLinePriority.Medium));
System\Windows\Forms\Design\ParentControlDesigner.cs (8)
319
snapLines.Add(new
SnapLine
(SnapLineType.Vertical, displayRectangle.Left, SnapLine.PaddingLeft, SnapLinePriority.Always));
320
snapLines.Add(new
SnapLine
(SnapLineType.Vertical, displayRectangle.Right, SnapLine.PaddingRight, SnapLinePriority.Always));
321
snapLines.Add(new
SnapLine
(SnapLineType.Horizontal, displayRectangle.Top, SnapLine.PaddingTop, SnapLinePriority.Always));
322
snapLines.Add(new
SnapLine
(SnapLineType.Horizontal, displayRectangle.Bottom, SnapLine.PaddingBottom, SnapLinePriority.Always));
848
new
SnapLine
(SnapLineType.Left, r.Right),
849
new
SnapLine
(SnapLineType.Right, r.Right),
850
new
SnapLine
(SnapLineType.Bottom, r.Bottom),
851
new
SnapLine
(SnapLineType.Top, r.Bottom)
System\Windows\Forms\Design\TextBoxBaseDesigner.cs (1)
56
snapLines.Add(new
SnapLine
(SnapLineType.Baseline, baseline, SnapLinePriority.Medium));
System\Windows\Forms\Design\UpDownBaseDesigner.cs (1)
54
snapLines.Add(new
SnapLine
(SnapLineType.Baseline, baseline, SnapLinePriority.Medium));
System.Windows.Forms.Design.Tests (23)
System\Windows\Forms\Design\Behavior\SnapLineTests.cs (23)
18
SnapLine snapLine =
new
(SnapLineType.Baseline, DefaultOffset);
29
SnapLine snapLine =
new
(SnapLineType.Baseline, DefaultOffset, DefaultFilter);
40
SnapLine snapLine =
new
(SnapLineType.Baseline, DefaultOffset, DefaultPriority);
51
SnapLine snapLine =
new
(SnapLineType.Baseline, DefaultOffset, DefaultFilter, DefaultPriority);
69
SnapLine snapLine =
new
(type, DefaultOffset, DefaultFilter, DefaultPriority);
84
SnapLine snapLine =
new
(type, DefaultOffset, DefaultFilter, DefaultPriority);
101
SnapLine snapLine =
new
(type, DefaultOffset, DefaultFilter, DefaultPriority);
113
SnapLine snapLine =
new
(SnapLineType.Baseline, offset, DefaultFilter, DefaultPriority);
122
SnapLine snapLine1 =
new
(SnapLineType.Top, DefaultOffset, DefaultFilter, DefaultPriority);
123
SnapLine snapLine2 =
new
(SnapLineType.Baseline, DefaultOffset, DefaultFilter, DefaultPriority);
131
SnapLine snapLine1 =
new
(SnapLineType.Top, DefaultOffset, null, DefaultPriority);
132
SnapLine snapLine2 =
new
(SnapLineType.Top, DefaultOffset, null, SnapLinePriority.Low);
140
SnapLine snapLine1 =
new
(SnapLineType.Top, DefaultOffset, null, DefaultPriority);
141
SnapLine snapLine2 =
new
(SnapLineType.Top, DefaultOffset, DefaultFilter, SnapLinePriority.Low);
176
SnapLine snapLine1 =
new
(SnapLineType.Top, DefaultOffset, snapLine1Filter, DefaultPriority);
177
SnapLine snapLine2 =
new
(SnapLineType.Top, DefaultOffset, snapLine2Filter, SnapLinePriority.Low);
206
SnapLine snapLine1 =
new
(SnapLineType.Top, DefaultOffset, snapLine1Filter, DefaultPriority);
207
SnapLine snapLine2 =
new
(SnapLineType.Top, DefaultOffset, snapLine2Filter, SnapLinePriority.Low);
215
SnapLine snapLine1 =
new
(SnapLineType.Top, DefaultOffset, "custom filter", DefaultPriority);
216
SnapLine snapLine2 =
new
(SnapLineType.Top, DefaultOffset, "custom filter", SnapLinePriority.Low);
224
SnapLine snapLine1 =
new
(SnapLineType.Top, DefaultOffset, "custom filter", DefaultPriority);
225
SnapLine snapLine2 =
new
(SnapLineType.Top, DefaultOffset, "another filter", SnapLinePriority.Low);
235
SnapLine snapLine =
new
(SnapLineType.Baseline, DefaultOffset, filter, DefaultPriority);
170 references to SnapLine
System.Design (1)
artifacts\obj\System.Design.Facade\Release\net9.0\System.Design.Forwards.cs (1)
80
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Windows.Forms.Design.Behavior.
SnapLine
))]
System.Windows.Forms.Design (90)
System\Windows\Forms\Design\Behavior\BehaviorService.cs (1)
805
foreach (
SnapLine
line in designer.SnapLinesInternal)
System\Windows\Forms\Design\Behavior\DragAssistanceManager.cs (33)
33
private readonly List<
SnapLine
> _verticalSnapLines = [];
34
private readonly List<
SnapLine
> _horizontalSnapLines = [];
36
private readonly List<
SnapLine
> _targetVerticalSnapLines = [];
37
private readonly List<
SnapLine
> _targetHorizontalSnapLines = [];
59
private readonly Dictionary<
SnapLine
, Rectangle> _snapLineToBounds = [];
194
private void AddSnapLines(ControlDesigner controlDesigner, List<
SnapLine
> horizontalList, List<
SnapLine
> verticalList, bool isTarget, bool validTarget)
196
IList<
SnapLine
> snapLines = controlDesigner.SnapLinesInternal;
219
foreach (
SnapLine
snapLine in snapLines)
224
if (snapLine.Filter is not null && snapLine.Filter.StartsWith(
SnapLine
.Padding, StringComparison.Ordinal))
243
if ((snapLine.Filter is not null) && snapLine.Filter.StartsWith(
SnapLine
.Padding, StringComparison.Ordinal))
270
private int BuildDistanceArray(List<
SnapLine
> snapLines, List<
SnapLine
> targetSnapLines, int[] distances, Rectangle dragBounds)
277
SnapLine
snapLine = snapLines[i];
291
SnapLine
targetSnapLine = targetSnapLines[j];
293
if (
SnapLine
.ShouldSnap(snapLine, targetSnapLine))
443
private void IdentifyAndStoreValidLines(List<
SnapLine
> snapLines, int[] distances, Rectangle dragBounds, int smallestDistance)
649
private static bool IsMarginOrPaddingSnapLine(
SnapLine
snapLine)
652
&& (snapLine.Filter.StartsWith(
SnapLine
.Margin, StringComparison.Ordinal)
653
|| snapLine.Filter.StartsWith(
SnapLine
.Padding, StringComparison.Ordinal));
666
foreach (
SnapLine
snapline in targetSnaplines)
749
private static int FindSmallestValidDistance(List<
SnapLine
> snapLines, int[] distances, int min, int max, int direction)
924
private void StoreSnapLine(
SnapLine
snapLine, Rectangle dragBounds)
932
type = snapLine.Filter!.StartsWith(
SnapLine
.Margin, StringComparison.Ordinal) ? LineType.Margin : LineType.Padding;
973
case
SnapLine
.PaddingRight:
976
case
SnapLine
.PaddingLeft:
979
case
SnapLine
.PaddingTop:
982
case
SnapLine
.PaddingBottom:
999
private bool ValidateMarginOrPaddingLine(
SnapLine
snapLine, Rectangle dragBounds)
1035
internal Point OnMouseMove(Rectangle dragBounds,
SnapLine
[] snapLines)
1046
internal Point OnMouseMove(Rectangle dragBounds,
SnapLine
[] snapLines, ref bool didSnap, bool shouldSnapHorizontally)
1056
foreach (
SnapLine
snapline in snapLines)
1085
internal Point OnMouseMove(Control targetControl,
SnapLine
[] snapLines, ref bool didSnap, bool shouldSnapHorizontally)
System\Windows\Forms\Design\Behavior\ResizeBehavior.cs (6)
158
private
SnapLine
[] GenerateSnapLines(SelectionRules rules, Point loc)
160
List<
SnapLine
> lines = new(2);
167
lines.Add(new SnapLine(SnapLineType.Horizontal, loc.Y + _primaryControl.Margin.Bottom,
SnapLine
.MarginBottom, SnapLinePriority.Always));
175
lines.Add(new SnapLine(SnapLineType.Horizontal, loc.Y - _primaryControl.Margin.Top,
SnapLine
.MarginTop, SnapLinePriority.Always));
184
lines.Add(new SnapLine(SnapLineType.Vertical, loc.X + _primaryControl.Margin.Right,
SnapLine
.MarginRight, SnapLinePriority.Always));
192
lines.Add(new SnapLine(SnapLineType.Vertical, loc.X - _primaryControl.Margin.Left,
SnapLine
.MarginLeft, SnapLinePriority.Always));
System\Windows\Forms\Design\Behavior\SnapLine.cs (2)
117
public static bool ShouldSnap(
SnapLine
line1,
SnapLine
line2)
System\Windows\Forms\Design\Behavior\ToolboxItemSnapLineBehavior.cs (5)
233
private static
SnapLine
[] GenerateNewToolSnapLines(Rectangle r)
240
new(SnapLineType.Horizontal, r.Top - 4,
SnapLine
.MarginTop, SnapLinePriority.Always),
241
new(SnapLineType.Horizontal, r.Bottom + 3,
SnapLine
.MarginBottom, SnapLinePriority.Always),
242
new(SnapLineType.Vertical, r.Left - 4,
SnapLine
.MarginLeft, SnapLinePriority.Always),
243
new(SnapLineType.Vertical, r.Right + 3,
SnapLine
.MarginRight, SnapLinePriority.Always)
System\Windows\Forms\Design\ButtonBaseDesigner.cs (1)
47
IList<
SnapLine
> snapLines = SnapLinesInternal;
System\Windows\Forms\Design\ComboBoxDesigner.cs (1)
32
IList<
SnapLine
> snapLines = SnapLinesInternal;
System\Windows\Forms\Design\ControlCommandSet.cs (6)
462
private List<
SnapLine
> GenerateSnapLines(SelectionRules rules, Control primaryControl, int directionOffsetX, int directionOffsetY)
464
List<
SnapLine
> lines = new(2);
481
lines.Add(new SnapLine(SnapLineType.Vertical, pt.X + primaryControl.Width + primaryControl.Margin.Right,
SnapLine
.MarginRight, SnapLinePriority.Always));
489
lines.Add(new SnapLine(SnapLineType.Vertical, pt.X - primaryControl.Margin.Left,
SnapLine
.MarginLeft, SnapLinePriority.Always));
502
lines.Add(new SnapLine(SnapLineType.Horizontal, pt.Y + primaryControl.Height + primaryControl.Margin.Bottom,
SnapLine
.MarginBottom, SnapLinePriority.Always));
631
List<
SnapLine
> targetSnaplines = GenerateSnapLines(des.SelectionRules, primaryControl, moveOffsetX, moveOffsetY);
System\Windows\Forms\Design\ControlDesigner.cs (8)
341
internal IList<
SnapLine
> SnapLinesInternal => EdgeAndMarginSnapLines();
343
internal IList<
SnapLine
> EdgeAndMarginSnapLines() => EdgeAndMarginSnapLines(Control.Margin);
345
internal IList<
SnapLine
> EdgeAndMarginSnapLines(Padding margin)
347
List<
SnapLine
> snapLines = new(8);
360
snapLines.Add(new SnapLine(SnapLineType.Horizontal, -margin.Top,
SnapLine
.MarginTop, SnapLinePriority.Always));
361
snapLines.Add(new SnapLine(SnapLineType.Horizontal, margin.Bottom + height,
SnapLine
.MarginBottom, SnapLinePriority.Always));
362
snapLines.Add(new SnapLine(SnapLineType.Vertical, -margin.Left,
SnapLine
.MarginLeft, SnapLinePriority.Always));
363
snapLines.Add(new SnapLine(SnapLineType.Vertical, margin.Right + width,
SnapLine
.MarginRight, SnapLinePriority.Always));
System\Windows\Forms\Design\DateTimePickerDesigner.cs (1)
24
IList<
SnapLine
> snapLines = SnapLinesInternal;
System\Windows\Forms\Design\FlowPanelDesigner.cs (3)
17
IList<
SnapLine
> snapLines = SnapLinesInternal;
22
if (snapLines[i] is
SnapLine
line
23
&& line.Filter?.Contains(
SnapLine
.Padding) == true)
System\Windows\Forms\Design\FormDocumentDesigner.cs (8)
189
IList<
SnapLine
> snapLines = null;
194
snapLines = new List<
SnapLine
>(4);
204
if (snapLines[i] is
SnapLine
snapLine && snapLine.Filter is not null && snapLine.Filter.StartsWith(
SnapLine
.Padding, StringComparison.Ordinal))
206
if (snapLine.Filter.Equals(
SnapLine
.PaddingLeft) || snapLine.Filter.Equals(
SnapLine
.PaddingTop))
212
if (snapLine.Filter.Equals(
SnapLine
.PaddingRight) || snapLine.Filter.Equals(
SnapLine
.PaddingBottom))
System\Windows\Forms\Design\LabelDesigner.cs (2)
32
IList<
SnapLine
> snapLines = SnapLinesInternal;
80
SnapLine
snapLine = snapLines[i];
System\Windows\Forms\Design\ParentControlDesigner.cs (11)
298
=> AddPaddingSnapLinesCommon((snapLines ??= new(4)).Adapt<
SnapLine
>());
300
internal void AddPaddingSnapLines(ref IList<
SnapLine
> snapLines)
301
=> AddPaddingSnapLinesCommon(snapLines ??= new List<
SnapLine
>(4));
303
private void AddPaddingSnapLinesCommon(IList<
SnapLine
> snapLines)
319
snapLines.Add(new SnapLine(SnapLineType.Vertical, displayRectangle.Left,
SnapLine
.PaddingLeft, SnapLinePriority.Always));
320
snapLines.Add(new SnapLine(SnapLineType.Vertical, displayRectangle.Right,
SnapLine
.PaddingRight, SnapLinePriority.Always));
321
snapLines.Add(new SnapLine(SnapLineType.Horizontal, displayRectangle.Top,
SnapLine
.PaddingTop, SnapLinePriority.Always));
322
snapLines.Add(new SnapLine(SnapLineType.Horizontal, displayRectangle.Bottom,
SnapLine
.PaddingBottom, SnapLinePriority.Always));
335
IList<
SnapLine
> snapLines = SnapLinesInternal;
340
snapLines = new List<
SnapLine
>(4);
844
private static
SnapLine
[] GenerateNewToolSnapLines(Rectangle r)
System\Windows\Forms\Design\TextBoxBaseDesigner.cs (1)
55
IList<
SnapLine
> snapLines = SnapLinesInternal;
System\Windows\Forms\Design\UpDownBaseDesigner.cs (1)
44
IList<
SnapLine
> snapLines = SnapLinesInternal;
System.Windows.Forms.Design.Tests (79)
System\Windows\Forms\Design\Behavior\SnapLineTests.cs (58)
8
private static readonly string[] s_margins = [
SnapLine
.MarginLeft,
SnapLine
.MarginTop,
SnapLine
.MarginRight,
SnapLine
.MarginBottom];
9
private static readonly string[] s_paddings = [
SnapLine
.PaddingLeft,
SnapLine
.PaddingTop,
SnapLine
.PaddingRight,
SnapLine
.PaddingBottom];
18
SnapLine
snapLine = new(SnapLineType.Baseline, DefaultOffset);
29
SnapLine
snapLine = new(SnapLineType.Baseline, DefaultOffset, DefaultFilter);
40
SnapLine
snapLine = new(SnapLineType.Baseline, DefaultOffset, DefaultPriority);
51
SnapLine
snapLine = new(SnapLineType.Baseline, DefaultOffset, DefaultFilter, DefaultPriority);
69
SnapLine
snapLine = new(type, DefaultOffset, DefaultFilter, DefaultPriority);
84
SnapLine
snapLine = new(type, DefaultOffset, DefaultFilter, DefaultPriority);
101
SnapLine
snapLine = new(type, DefaultOffset, DefaultFilter, DefaultPriority);
113
SnapLine
snapLine = new(SnapLineType.Baseline, offset, DefaultFilter, DefaultPriority);
122
SnapLine
snapLine1 = new(SnapLineType.Top, DefaultOffset, DefaultFilter, DefaultPriority);
123
SnapLine
snapLine2 = new(SnapLineType.Baseline, DefaultOffset, DefaultFilter, DefaultPriority);
125
Assert.False(
SnapLine
.ShouldSnap(snapLine1, snapLine2));
131
SnapLine
snapLine1 = new(SnapLineType.Top, DefaultOffset, null, DefaultPriority);
132
SnapLine
snapLine2 = new(SnapLineType.Top, DefaultOffset, null, SnapLinePriority.Low);
134
Assert.True(
SnapLine
.ShouldSnap(snapLine1, snapLine2));
140
SnapLine
snapLine1 = new(SnapLineType.Top, DefaultOffset, null, DefaultPriority);
141
SnapLine
snapLine2 = new(SnapLineType.Top, DefaultOffset, DefaultFilter, SnapLinePriority.Low);
143
Assert.False(
SnapLine
.ShouldSnap(snapLine1, snapLine2));
148
return EnumerateFilterMarginPaths(
SnapLine
.MarginRight,
SnapLine
.MarginLeft,
SnapLine
.PaddingRight)
149
.Union(EnumerateFilterMarginPaths(
SnapLine
.MarginLeft,
SnapLine
.MarginRight,
SnapLine
.PaddingLeft))
150
.Union(EnumerateFilterMarginPaths(
SnapLine
.MarginTop,
SnapLine
.MarginBottom,
SnapLine
.PaddingTop))
151
.Union(EnumerateFilterMarginPaths(
SnapLine
.MarginBottom,
SnapLine
.MarginTop,
SnapLine
.PaddingBottom));
176
SnapLine
snapLine1 = new(SnapLineType.Top, DefaultOffset, snapLine1Filter, DefaultPriority);
177
SnapLine
snapLine2 = new(SnapLineType.Top, DefaultOffset, snapLine2Filter, SnapLinePriority.Low);
179
Assert.Equal(expected,
SnapLine
.ShouldSnap(snapLine1, snapLine2));
184
return EnumerateFilterPaddingPaths(
SnapLine
.PaddingLeft,
SnapLine
.MarginLeft)
185
.Union(EnumerateFilterPaddingPaths(
SnapLine
.PaddingRight,
SnapLine
.MarginRight))
186
.Union(EnumerateFilterPaddingPaths(
SnapLine
.PaddingTop,
SnapLine
.MarginTop))
187
.Union(EnumerateFilterPaddingPaths(
SnapLine
.PaddingBottom,
SnapLine
.MarginBottom));
206
SnapLine
snapLine1 = new(SnapLineType.Top, DefaultOffset, snapLine1Filter, DefaultPriority);
207
SnapLine
snapLine2 = new(SnapLineType.Top, DefaultOffset, snapLine2Filter, SnapLinePriority.Low);
209
Assert.Equal(expected,
SnapLine
.ShouldSnap(snapLine1, snapLine2));
215
SnapLine
snapLine1 = new(SnapLineType.Top, DefaultOffset, "custom filter", DefaultPriority);
216
SnapLine
snapLine2 = new(SnapLineType.Top, DefaultOffset, "custom filter", SnapLinePriority.Low);
218
Assert.True(
SnapLine
.ShouldSnap(snapLine1, snapLine2));
224
SnapLine
snapLine1 = new(SnapLineType.Top, DefaultOffset, "custom filter", DefaultPriority);
225
SnapLine
snapLine2 = new(SnapLineType.Top, DefaultOffset, "another filter", SnapLinePriority.Low);
227
Assert.False(
SnapLine
.ShouldSnap(snapLine1, snapLine2));
235
SnapLine
snapLine = new(SnapLineType.Baseline, DefaultOffset, filter, DefaultPriority);
System\Windows\Forms\Design\FlowPanelDesignerTests.cs (4)
43
var snapLines = designer.SnapLines as IList<
SnapLine
>;
46
snapLines.Should().NotContain(line => line.Filter is object && line.Filter.Contains(
SnapLine
.Padding));
54
var snapLines = designer.SnapLines as IList<
SnapLine
>;
57
snapLines.Should().Contain(line => line.Filter == null || !line.Filter.Contains(
SnapLine
.Padding));
System\Windows\Forms\Design\TextBoxBaseDesignerTests.cs (4)
53
List<
SnapLine
> snapLines = (List<
SnapLine
>)_designer.SnapLines;
57
SnapLine
? baselineSnapLine = snapLines.Cast<
SnapLine
>().FirstOrDefault(sl => sl.SnapLineType == SnapLineType.Baseline);
System\Windows\Forms\Design\ToolStripContentPanelDesignerTests.cs (8)
31
IList<
SnapLine
> snapLines = _toolStripContentPanelDesigner.SnapLines.Cast<
SnapLine
>().ToList();
39
string?[] paddingFilters = [
SnapLine
.PaddingLeft,
SnapLine
.PaddingRight,
SnapLine
.PaddingTop,
SnapLine
.PaddingBottom];
41
List<
SnapLine
> snapLines = _toolStripContentPanelDesigner.SnapLines.Cast<
SnapLine
>().ToList();
System\Windows\Forms\Design\UpDownBaseDesignerTests.cs (5)
54
List<
SnapLine
> snapLines = (List<
SnapLine
>)_designer.SnapLines;
57
SnapLine
? baselineSnapLine = snapLines.FirstOrDefault(sl => sl.SnapLineType == SnapLineType.Baseline);
58
baselineSnapLine.Should().BeOfType<
SnapLine
>().Which.Priority.Should().Be(SnapLinePriority.Medium);
61
baselineSnapLine.Should().BeOfType<
SnapLine
>().Which.Offset.Should().Be(expectedBaseline);