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)
97
snapLines.Add(new
SnapLine
(SnapLineType.Baseline, baseline, SnapLinePriority.Medium));
System\Windows\Forms\Design\ComboBoxDesigner.cs (1)
35
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)
60
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)
52
snapLines.Add(new
SnapLine
(SnapLineType.Baseline, baseline, SnapLinePriority.Medium));
System.Windows.Forms.Design.Tests (23)
System\Windows\Forms\Design\Behavior\SnapLineTests.cs (23)
20
SnapLine snapLine =
new
(SnapLineType.Baseline, DefaultOffset);
31
SnapLine snapLine =
new
(SnapLineType.Baseline, DefaultOffset, DefaultFilter);
42
SnapLine snapLine =
new
(SnapLineType.Baseline, DefaultOffset, DefaultPriority);
53
SnapLine snapLine =
new
(SnapLineType.Baseline, DefaultOffset, DefaultFilter, DefaultPriority);
71
SnapLine snapLine =
new
(type, DefaultOffset, DefaultFilter, DefaultPriority);
86
SnapLine snapLine =
new
(type, DefaultOffset, DefaultFilter, DefaultPriority);
103
SnapLine snapLine =
new
(type, DefaultOffset, DefaultFilter, DefaultPriority);
115
SnapLine snapLine =
new
(SnapLineType.Baseline, offset, DefaultFilter, DefaultPriority);
124
SnapLine snapLine1 =
new
(SnapLineType.Top, DefaultOffset, DefaultFilter, DefaultPriority);
125
SnapLine snapLine2 =
new
(SnapLineType.Baseline, DefaultOffset, DefaultFilter, DefaultPriority);
133
SnapLine snapLine1 =
new
(SnapLineType.Top, DefaultOffset, null, DefaultPriority);
134
SnapLine snapLine2 =
new
(SnapLineType.Top, DefaultOffset, null, SnapLinePriority.Low);
142
SnapLine snapLine1 =
new
(SnapLineType.Top, DefaultOffset, null, DefaultPriority);
143
SnapLine snapLine2 =
new
(SnapLineType.Top, DefaultOffset, DefaultFilter, SnapLinePriority.Low);
178
SnapLine snapLine1 =
new
(SnapLineType.Top, DefaultOffset, snapLine1Filter, DefaultPriority);
179
SnapLine snapLine2 =
new
(SnapLineType.Top, DefaultOffset, snapLine2Filter, SnapLinePriority.Low);
208
SnapLine snapLine1 =
new
(SnapLineType.Top, DefaultOffset, snapLine1Filter, DefaultPriority);
209
SnapLine snapLine2 =
new
(SnapLineType.Top, DefaultOffset, snapLine2Filter, SnapLinePriority.Low);
217
SnapLine snapLine1 =
new
(SnapLineType.Top, DefaultOffset, "custom filter", DefaultPriority);
218
SnapLine snapLine2 =
new
(SnapLineType.Top, DefaultOffset, "custom filter", SnapLinePriority.Low);
226
SnapLine snapLine1 =
new
(SnapLineType.Top, DefaultOffset, "custom filter", DefaultPriority);
227
SnapLine snapLine2 =
new
(SnapLineType.Top, DefaultOffset, "another filter", SnapLinePriority.Low);
237
SnapLine snapLine =
new
(SnapLineType.Baseline, DefaultOffset, filter, DefaultPriority);
170 references to SnapLine
System.Design (1)
artifacts\obj\System.Design.Facade\Release\net10.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)
45
IList<
SnapLine
> snapLines = SnapLinesInternal;
System\Windows\Forms\Design\ComboBoxDesigner.cs (1)
30
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)
30
IList<
SnapLine
> snapLines = SnapLinesInternal;
78
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)
42
IList<
SnapLine
> snapLines = SnapLinesInternal;
System.Windows.Forms.Design.Tests (79)
System\Windows\Forms\Design\Behavior\SnapLineTests.cs (58)
10
private static readonly string[] s_margins = [
SnapLine
.MarginLeft,
SnapLine
.MarginTop,
SnapLine
.MarginRight,
SnapLine
.MarginBottom];
11
private static readonly string[] s_paddings = [
SnapLine
.PaddingLeft,
SnapLine
.PaddingTop,
SnapLine
.PaddingRight,
SnapLine
.PaddingBottom];
20
SnapLine
snapLine = new(SnapLineType.Baseline, DefaultOffset);
31
SnapLine
snapLine = new(SnapLineType.Baseline, DefaultOffset, DefaultFilter);
42
SnapLine
snapLine = new(SnapLineType.Baseline, DefaultOffset, DefaultPriority);
53
SnapLine
snapLine = new(SnapLineType.Baseline, DefaultOffset, DefaultFilter, DefaultPriority);
71
SnapLine
snapLine = new(type, DefaultOffset, DefaultFilter, DefaultPriority);
86
SnapLine
snapLine = new(type, DefaultOffset, DefaultFilter, DefaultPriority);
103
SnapLine
snapLine = new(type, DefaultOffset, DefaultFilter, DefaultPriority);
115
SnapLine
snapLine = new(SnapLineType.Baseline, offset, DefaultFilter, DefaultPriority);
124
SnapLine
snapLine1 = new(SnapLineType.Top, DefaultOffset, DefaultFilter, DefaultPriority);
125
SnapLine
snapLine2 = new(SnapLineType.Baseline, DefaultOffset, DefaultFilter, DefaultPriority);
127
Assert.False(
SnapLine
.ShouldSnap(snapLine1, snapLine2));
133
SnapLine
snapLine1 = new(SnapLineType.Top, DefaultOffset, null, DefaultPriority);
134
SnapLine
snapLine2 = new(SnapLineType.Top, DefaultOffset, null, SnapLinePriority.Low);
136
Assert.True(
SnapLine
.ShouldSnap(snapLine1, snapLine2));
142
SnapLine
snapLine1 = new(SnapLineType.Top, DefaultOffset, null, DefaultPriority);
143
SnapLine
snapLine2 = new(SnapLineType.Top, DefaultOffset, DefaultFilter, SnapLinePriority.Low);
145
Assert.False(
SnapLine
.ShouldSnap(snapLine1, snapLine2));
150
return EnumerateFilterMarginPaths(
SnapLine
.MarginRight,
SnapLine
.MarginLeft,
SnapLine
.PaddingRight)
151
.Union(EnumerateFilterMarginPaths(
SnapLine
.MarginLeft,
SnapLine
.MarginRight,
SnapLine
.PaddingLeft))
152
.Union(EnumerateFilterMarginPaths(
SnapLine
.MarginTop,
SnapLine
.MarginBottom,
SnapLine
.PaddingTop))
153
.Union(EnumerateFilterMarginPaths(
SnapLine
.MarginBottom,
SnapLine
.MarginTop,
SnapLine
.PaddingBottom));
178
SnapLine
snapLine1 = new(SnapLineType.Top, DefaultOffset, snapLine1Filter, DefaultPriority);
179
SnapLine
snapLine2 = new(SnapLineType.Top, DefaultOffset, snapLine2Filter, SnapLinePriority.Low);
181
Assert.Equal(expected,
SnapLine
.ShouldSnap(snapLine1, snapLine2));
186
return EnumerateFilterPaddingPaths(
SnapLine
.PaddingLeft,
SnapLine
.MarginLeft)
187
.Union(EnumerateFilterPaddingPaths(
SnapLine
.PaddingRight,
SnapLine
.MarginRight))
188
.Union(EnumerateFilterPaddingPaths(
SnapLine
.PaddingTop,
SnapLine
.MarginTop))
189
.Union(EnumerateFilterPaddingPaths(
SnapLine
.PaddingBottom,
SnapLine
.MarginBottom));
208
SnapLine
snapLine1 = new(SnapLineType.Top, DefaultOffset, snapLine1Filter, DefaultPriority);
209
SnapLine
snapLine2 = new(SnapLineType.Top, DefaultOffset, snapLine2Filter, SnapLinePriority.Low);
211
Assert.Equal(expected,
SnapLine
.ShouldSnap(snapLine1, snapLine2));
217
SnapLine
snapLine1 = new(SnapLineType.Top, DefaultOffset, "custom filter", DefaultPriority);
218
SnapLine
snapLine2 = new(SnapLineType.Top, DefaultOffset, "custom filter", SnapLinePriority.Low);
220
Assert.True(
SnapLine
.ShouldSnap(snapLine1, snapLine2));
226
SnapLine
snapLine1 = new(SnapLineType.Top, DefaultOffset, "custom filter", DefaultPriority);
227
SnapLine
snapLine2 = new(SnapLineType.Top, DefaultOffset, "another filter", SnapLinePriority.Low);
229
Assert.False(
SnapLine
.ShouldSnap(snapLine1, snapLine2));
237
SnapLine
snapLine = new(SnapLineType.Baseline, DefaultOffset, filter, DefaultPriority);
System\Windows\Forms\Design\FlowPanelDesignerTests.cs (4)
41
var snapLines = designer.SnapLines as IList<
SnapLine
>;
44
snapLines.Should().NotContain(line => line.Filter is object && line.Filter.Contains(
SnapLine
.Padding));
52
var snapLines = designer.SnapLines as IList<
SnapLine
>;
55
snapLines.Should().Contain(line => line.Filter == null || !line.Filter.Contains(
SnapLine
.Padding));
System\Windows\Forms\Design\TextBoxBaseDesignerTests.cs (4)
51
List<
SnapLine
> snapLines = (List<
SnapLine
>)_designer.SnapLines;
55
SnapLine
? baselineSnapLine = snapLines.Cast<
SnapLine
>().FirstOrDefault(sl => sl.SnapLineType == SnapLineType.Baseline);
System\Windows\Forms\Design\ToolStripContentPanelDesignerTests.cs (8)
29
IList<
SnapLine
> snapLines = _toolStripContentPanelDesigner.SnapLines.Cast<
SnapLine
>().ToList();
37
string?[] paddingFilters = [
SnapLine
.PaddingLeft,
SnapLine
.PaddingRight,
SnapLine
.PaddingTop,
SnapLine
.PaddingBottom];
39
List<
SnapLine
> snapLines = _toolStripContentPanelDesigner.SnapLines.Cast<
SnapLine
>().ToList();
System\Windows\Forms\Design\UpDownBaseDesignerTests.cs (5)
52
List<
SnapLine
> snapLines = (List<
SnapLine
>)_designer.SnapLines;
55
SnapLine
? baselineSnapLine = snapLines.FirstOrDefault(sl => sl.SnapLineType == SnapLineType.Baseline);
56
baselineSnapLine.Should().BeOfType<
SnapLine
>().Which.Priority.Should().Be(SnapLinePriority.Medium);
59
baselineSnapLine.Should().BeOfType<
SnapLine
>().Which.Offset.Should().Be(expectedBaseline);