50 references to SnapLinePriority
System.Design (1)
artifacts\obj\System.Design.Facade\Release\net10.0\System.Design.Forwards.cs (1)
81
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Windows.Forms.Design.Behavior.
SnapLinePriority
))]
System.Windows.Forms.Design (37)
System\Windows\Forms\Design\Behavior\DragAssistanceManager.cs (3)
317
if (pri != (int)
SnapLinePriority
.Always)
452
if ((pri > highestPriority) && (pri != (int)
SnapLinePriority
.Always))
464
((int)snapLines[i].Priority == (int)
SnapLinePriority
.Always)))
System\Windows\Forms\Design\Behavior\ResizeBehavior.cs (4)
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 (5)
38
: this(type, offset, filter: null,
SnapLinePriority
.Low)
46
: this(type, offset, filter,
SnapLinePriority
.Low)
53
public SnapLine(SnapLineType type, int offset,
SnapLinePriority
priority)
61
public SnapLine(SnapLineType type, int offset, string? filter,
SnapLinePriority
priority)
99
public
SnapLinePriority
Priority { get; }
System\Windows\Forms\Design\Behavior\ToolboxItemSnapLineBehavior.cs (4)
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)
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 (3)
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));
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 (4)
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));
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 (12)
System\Windows\Forms\Design\Behavior\SnapLineTests.cs (10)
13
private const
SnapLinePriority
DefaultPriority =
SnapLinePriority
.Medium;
23
Assert.Equal(
SnapLinePriority
.Low, snapLine.Priority);
34
Assert.Equal(
SnapLinePriority
.Low, snapLine.Priority);
132
SnapLine snapLine2 = new(SnapLineType.Top, DefaultOffset, null,
SnapLinePriority
.Low);
141
SnapLine snapLine2 = new(SnapLineType.Top, DefaultOffset, DefaultFilter,
SnapLinePriority
.Low);
177
SnapLine snapLine2 = new(SnapLineType.Top, DefaultOffset, snapLine2Filter,
SnapLinePriority
.Low);
207
SnapLine snapLine2 = new(SnapLineType.Top, DefaultOffset, snapLine2Filter,
SnapLinePriority
.Low);
216
SnapLine snapLine2 = new(SnapLineType.Top, DefaultOffset, "custom filter",
SnapLinePriority
.Low);
225
SnapLine snapLine2 = new(SnapLineType.Top, DefaultOffset, "another filter",
SnapLinePriority
.Low);
System\Windows\Forms\Design\TextBoxBaseDesignerTests.cs (1)
60
baselineSnapLine!.Priority.Should().Be(
SnapLinePriority
.Medium);
System\Windows\Forms\Design\UpDownBaseDesignerTests.cs (1)
58
baselineSnapLine.Should().BeOfType<SnapLine>().Which.Priority.Should().Be(
SnapLinePriority
.Medium);