64 references to TableLayoutPanelCellPosition
System.Windows.Forms (6)
System\Windows\Forms\Layout\TableLayout.cs (3)
1328return new TableLayoutPanelCellPosition(-1, -1); 1337return new TableLayoutPanelCellPosition(-1, -1); 1347return new TableLayoutPanelCellPosition(layoutInfo.ColumnStart, layoutInfo.RowStart);
System\Windows\Forms\Panels\TableLayoutPanel\TableLayoutPanelCellPositionTypeConverter.cs (2)
58return new TableLayoutPanelCellPosition(values[0], values[1]); 82return new TableLayoutPanelCellPosition(
System\Windows\Forms\Panels\TableLayoutPanel\TableLayoutSettings.cs (1)
355return new TableLayoutPanelCellPosition(GetColumn(control), GetRow(control));
System.Windows.Forms.Design (2)
System\Windows\Forms\Design\TableLayoutPanelDesigner.cs (2)
598Table.SetCellPosition(control, new TableLayoutPanelCellPosition(newControlPosition.X, newControlPosition.Y)); 1258Table.SetCellPosition(e.Control, new TableLayoutPanelCellPosition(-1, -1));
System.Windows.Forms.Tests (56)
System\Windows\Forms\Layout\TableLayoutSettingsTests.cs (21)
162Assert.Equal(new TableLayoutPanelCellPosition(-1, -1), settings.GetCellPosition(child)); 171Assert.Equal(new TableLayoutPanelCellPosition(-1, -1), settings.GetCellPosition(child)); 203Assert.Equal(new TableLayoutPanelCellPosition(-1, -1), settings.GetCellPosition("control")); 449yield return new object[] { new TableLayoutPanelCellPosition(-1, -1) }; 450yield return new object[] { new TableLayoutPanelCellPosition(0, -1) }; 451yield return new object[] { new TableLayoutPanelCellPosition(-1, 0) }; 452yield return new object[] { new TableLayoutPanelCellPosition(0, 0) }; 453yield return new object[] { new TableLayoutPanelCellPosition(1, 2) }; 486yield return new object[] { new TableLayoutPanelCellPosition(-1, -1), 1 }; 487yield return new object[] { new TableLayoutPanelCellPosition(0, -1), 1 }; 488yield return new object[] { new TableLayoutPanelCellPosition(-1, 0), 1 }; 489yield return new object[] { new TableLayoutPanelCellPosition(0, 0), 1 }; 490yield return new object[] { new TableLayoutPanelCellPosition(1, 2), 1 }; 622settings.SetCellPosition(child, new TableLayoutPanelCellPosition(1, 1)); 623Assert.Equal(new TableLayoutPanelCellPosition(1, 1), settings.GetCellPosition(child)); 625settings.SetCellPosition(child, new TableLayoutPanelCellPosition(2, 2)); 626Assert.Equal(new TableLayoutPanelCellPosition(2, 2), settings.GetCellPosition(child)); 636settings.SetCellPosition(child, new TableLayoutPanelCellPosition(1, 1)); 637Assert.Equal(new TableLayoutPanelCellPosition(1, 1), settings.GetCellPosition(child)); 639settings.SetCellPosition(child, new TableLayoutPanelCellPosition(2, 2)); 640Assert.Equal(new TableLayoutPanelCellPosition(2, 2), settings.GetCellPosition(child));
System\Windows\Forms\TableLayoutPanelCellPositionTests.cs (16)
27TableLayoutPanelCellPosition style = new(column, row); 35Assert.Throws<ArgumentOutOfRangeException>("column", () => new TableLayoutPanelCellPosition(-2, 0)); 41Assert.Throws<ArgumentOutOfRangeException>("row", () => new TableLayoutPanelCellPosition(0, -2)); 68yield return new object[] { new TableLayoutPanelCellPosition(1, 2), new TableLayoutPanelCellPosition(1, 2), true }; 69yield return new object[] { new TableLayoutPanelCellPosition(1, 2), new TableLayoutPanelCellPosition(2, 2), false }; 70yield return new object[] { new TableLayoutPanelCellPosition(1, 2), new TableLayoutPanelCellPosition(1, 3), false }; 72yield return new object[] { new TableLayoutPanelCellPosition(1, 2), new(), false }; 73yield return new object[] { new TableLayoutPanelCellPosition(1, 2), null, false }; 93TableLayoutPanelCellPosition position = new(1, 2); 112yield return new object[] { "1,2", new TableLayoutPanelCellPosition(1, 2) }; 113yield return new object[] { " 1 , 2 ", new TableLayoutPanelCellPosition(1, 2) }; 175InstanceDescriptor descriptor = Assert.IsType<InstanceDescriptor>(converter.ConvertTo(new TableLayoutPanelCellPosition(1, 2), typeof(InstanceDescriptor))); 213Assert.Equal(new TableLayoutPanelCellPosition(1, 2), position);
System\Windows\Forms\TableLayoutPanelTests.cs (19)
648Assert.Equal(new TableLayoutPanelCellPosition(-1, -1), control.GetCellPosition(child)); 896Assert.Equal(new TableLayoutPanelCellPosition(1, 2), control.GetPositionFromControl(child)); 908Assert.Equal(new TableLayoutPanelCellPosition(1, 2), control.GetPositionFromControl(child)); 919Assert.Equal(new TableLayoutPanelCellPosition(-1, -1), control.GetPositionFromControl(child)); 926Assert.Equal(new TableLayoutPanelCellPosition(-1, -1), control.GetPositionFromControl(null)); 1544yield return new object[] { new TableLayoutPanelCellPosition(-1, -1) }; 1545yield return new object[] { new TableLayoutPanelCellPosition(0, -1) }; 1546yield return new object[] { new TableLayoutPanelCellPosition(-1, 0) }; 1547yield return new object[] { new TableLayoutPanelCellPosition(0, 0) }; 1548yield return new object[] { new TableLayoutPanelCellPosition(1, 2) }; 1580yield return new object[] { new TableLayoutPanelCellPosition(-1, -1), 1 }; 1581yield return new object[] { new TableLayoutPanelCellPosition(0, -1), 1 }; 1582yield return new object[] { new TableLayoutPanelCellPosition(-1, 0), 1 }; 1583yield return new object[] { new TableLayoutPanelCellPosition(0, 0), 1 }; 1584yield return new object[] { new TableLayoutPanelCellPosition(1, 2), 1 }; 1644control.SetCellPosition(child, new TableLayoutPanelCellPosition(1, 1)); 1645Assert.Equal(new TableLayoutPanelCellPosition(1, 1), control.GetCellPosition(child)); 1647control.SetCellPosition(child, new TableLayoutPanelCellPosition(2, 2)); 1648Assert.Equal(new TableLayoutPanelCellPosition(2, 2), control.GetCellPosition(child));