1 write to Filter
System.Windows.Forms.Design (1)
System\Windows\Forms\Design\Behavior\SnapLine.cs (1)
65Filter = filter;
54 references to Filter
System.Windows.Forms.Design (45)
System\Windows\Forms\Design\Behavior\DragAssistanceManager.cs (9)
224if (snapLine.Filter is not null && snapLine.Filter.StartsWith(SnapLine.Padding, StringComparison.Ordinal)) 243if ((snapLine.Filter is not null) && snapLine.Filter.StartsWith(SnapLine.Padding, StringComparison.Ordinal)) 651return snapLine.Filter is not null 652&& (snapLine.Filter.StartsWith(SnapLine.Margin, StringComparison.Ordinal) 653|| snapLine.Filter.StartsWith(SnapLine.Padding, StringComparison.Ordinal)); 932type = snapLine.Filter!.StartsWith(SnapLine.Margin, StringComparison.Ordinal) ? LineType.Margin : LineType.Padding; 971switch (snapLine.Filter)
System\Windows\Forms\Design\Behavior\SnapLine.cs (29)
126if (line1.Filter is null && line2.Filter is null) 133if (line1.Filter is null || line2.Filter is null) 139if (line1.Filter.Contains(Margin)) 141if ((line1.Filter.Equals(MarginRight) && (line2.Filter.Equals(MarginLeft) || line2.Filter.Equals(PaddingRight))) || 142(line1.Filter.Equals(MarginLeft) && (line2.Filter.Equals(MarginRight) || line2.Filter.Equals(PaddingLeft))) || 143(line1.Filter.Equals(MarginTop) && (line2.Filter.Equals(MarginBottom) || line2.Filter.Equals(PaddingTop))) || 144(line1.Filter.Equals(MarginBottom) && (line2.Filter.Equals(MarginTop) || line2.Filter.Equals(PaddingBottom)))) 153if (line1.Filter.Contains(Padding)) 155if ((line1.Filter.Equals(PaddingLeft) && line2.Filter.Equals(MarginLeft)) || 156(line1.Filter.Equals(PaddingRight) && line2.Filter.Equals(MarginRight)) || 157(line1.Filter.Equals(PaddingTop) && line2.Filter.Equals(MarginTop)) || 158(line1.Filter.Equals(PaddingBottom) && line2.Filter.Equals(MarginBottom))) 167if (line1.Filter.Equals(line2.Filter)) 181return $"SnapLine: {{type = {SnapLineType}, offset = {Offset}, priority = {Priority}, filter = {Filter ?? "<null>"}}}";
System\Windows\Forms\Design\FlowPanelDesigner.cs (1)
23&& line.Filter?.Contains(SnapLine.Padding) == true)
System\Windows\Forms\Design\FormDocumentDesigner.cs (6)
204if (snapLines[i] is SnapLine snapLine && snapLine.Filter is not null && snapLine.Filter.StartsWith(SnapLine.Padding, StringComparison.Ordinal)) 206if (snapLine.Filter.Equals(SnapLine.PaddingLeft) || snapLine.Filter.Equals(SnapLine.PaddingTop)) 212if (snapLine.Filter.Equals(SnapLine.PaddingRight) || snapLine.Filter.Equals(SnapLine.PaddingBottom))
System.Windows.Forms.Design.Tests (9)
System\Windows\Forms\Design\Behavior\SnapLineTests.cs (4)
22Assert.Null(snapLine.Filter); 33Assert.Equal(DefaultFilter, snapLine.Filter); 44Assert.Null(snapLine.Filter); 55Assert.Equal(DefaultFilter, snapLine.Filter);
System\Windows\Forms\Design\FlowPanelDesignerTests.cs (4)
46snapLines.Should().NotContain(line => line.Filter is object && line.Filter.Contains(SnapLine.Padding)); 57snapLines.Should().Contain(line => line.Filter == null || !line.Filter.Contains(SnapLine.Padding));
System\Windows\Forms\Design\ToolStripContentPanelDesignerTests.cs (1)
43bool containsPaddingSnapLines = snapLines.Any(snapLine => paddingFilters.Contains(snapLine.Filter));