198 references to DataGridViewContentAlignment
System.Windows.Forms (198)
winforms\Managed\System\WinForms\DataGridView.cs (6)
1953
defaultStyle.AlignmentInternal =
DataGridViewContentAlignment
.MiddleLeft;
2509
this.defaultCellStyle.Alignment ==
DataGridViewContentAlignment
.NotSet ||
2536
if (this.defaultCellStyle.Alignment ==
DataGridViewContentAlignment
.NotSet)
2538
defaultCellStyleTmp.AlignmentInternal =
DataGridViewContentAlignment
.MiddleLeft;
2580
defaultCellStyle.AlignmentInternal =
DataGridViewContentAlignment
.MiddleLeft;
2642
defaultStyle.AlignmentInternal =
DataGridViewContentAlignment
.MiddleLeft;
winforms\Managed\System\WinForms\DataGridViewButtonColumn.cs (2)
33
defaultCellStyle.AlignmentInternal =
DataGridViewContentAlignment
.MiddleCenter;
242
defaultCellStyle.Alignment !=
DataGridViewContentAlignment
.MiddleCenter ||
winforms\Managed\System\WinForms\DataGridViewCell.cs (7)
2450
if (cellStyle != null && cellStyle.Alignment !=
DataGridViewContentAlignment
.NotSet)
2454
else if (rowStyle != null && rowStyle.Alignment !=
DataGridViewContentAlignment
.NotSet)
2458
else if (this.DataGridView.RowsDefaultCellStyle.Alignment !=
DataGridViewContentAlignment
.NotSet &&
2459
(rowIndex % 2 == 0 || this.DataGridView.AlternatingRowsDefaultCellStyle.Alignment ==
DataGridViewContentAlignment
.NotSet))
2463
else if (rowIndex % 2 == 1 && this.DataGridView.AlternatingRowsDefaultCellStyle.Alignment !=
DataGridViewContentAlignment
.NotSet)
2467
else if (columnStyle != null && columnStyle.Alignment !=
DataGridViewContentAlignment
.NotSet)
2473
Debug.Assert(dataGridViewStyle.Alignment !=
DataGridViewContentAlignment
.NotSet);
winforms\Managed\System\WinForms\DataGridViewCellStyle.cs (19)
88
DefaultValue(
DataGridViewContentAlignment
.NotSet),
91
public
DataGridViewContentAlignment
Alignment
99
return (
DataGridViewContentAlignment
) alignment;
101
return
DataGridViewContentAlignment
.NotSet;
107
case
DataGridViewContentAlignment
.NotSet:
108
case
DataGridViewContentAlignment
.TopLeft:
109
case
DataGridViewContentAlignment
.TopCenter:
110
case
DataGridViewContentAlignment
.TopRight:
111
case
DataGridViewContentAlignment
.MiddleLeft:
112
case
DataGridViewContentAlignment
.MiddleCenter:
113
case
DataGridViewContentAlignment
.MiddleRight:
114
case
DataGridViewContentAlignment
.BottomLeft:
115
case
DataGridViewContentAlignment
.BottomCenter:
116
case
DataGridViewContentAlignment
.BottomRight:
119
throw new InvalidEnumArgumentException("value", (int)value, typeof(
DataGridViewContentAlignment
));
125
internal
DataGridViewContentAlignment
AlignmentInternal
132
Debug.Assert(Enum.IsDefined(typeof(
DataGridViewContentAlignment
), value));
642
if (dataGridViewCellStyle.Alignment !=
DataGridViewContentAlignment
.NotSet)
898
if (this.Alignment !=
DataGridViewContentAlignment
.NotSet)
winforms\Managed\System\WinForms\DataGridViewCheckBoxCell.cs (20)
28
private static readonly
DataGridViewContentAlignment
anyLeft =
DataGridViewContentAlignment
.TopLeft |
DataGridViewContentAlignment
.MiddleLeft |
DataGridViewContentAlignment
.BottomLeft;
29
private static readonly
DataGridViewContentAlignment
anyRight =
DataGridViewContentAlignment
.TopRight |
DataGridViewContentAlignment
.MiddleRight |
DataGridViewContentAlignment
.BottomRight;
30
private static readonly
DataGridViewContentAlignment
anyCenter =
DataGridViewContentAlignment
.TopCenter |
DataGridViewContentAlignment
.MiddleCenter |
DataGridViewContentAlignment
.BottomCenter;
31
private static readonly
DataGridViewContentAlignment
anyBottom =
DataGridViewContentAlignment
.BottomRight |
DataGridViewContentAlignment
.BottomCenter |
DataGridViewContentAlignment
.BottomLeft;
32
private static readonly
DataGridViewContentAlignment
anyMiddle =
DataGridViewContentAlignment
.MiddleRight |
DataGridViewContentAlignment
.MiddleCenter |
DataGridViewContentAlignment
.MiddleLeft;
winforms\Managed\System\WinForms\DataGridViewCheckBoxColumn.cs (2)
34
defaultCellStyle.AlignmentInternal =
DataGridViewContentAlignment
.MiddleCenter;
347
defaultCellStyle.Alignment !=
DataGridViewContentAlignment
.MiddleCenter ||
winforms\Managed\System\WinForms\DataGridViewColumn.cs (3)
323
defaultCellStyle.Alignment !=
DataGridViewContentAlignment
.NotSet ||
717
if (columnStyle != null && columnStyle.Alignment !=
DataGridViewContentAlignment
.NotSet)
723
Debug.Assert(dataGridViewStyle.Alignment !=
DataGridViewContentAlignment
.NotSet);
winforms\Managed\System\WinForms\DataGridViewColumnHeaderCell.cs (3)
456
if (cellStyle != null && cellStyle.Alignment !=
DataGridViewContentAlignment
.NotSet)
460
else if (columnHeadersStyle.Alignment !=
DataGridViewContentAlignment
.NotSet)
466
Debug.Assert(dataGridViewStyle.Alignment !=
DataGridViewContentAlignment
.NotSet);
winforms\Managed\System\WinForms\DataGridViewImageCell.cs (25)
667
case
DataGridViewContentAlignment
.TopRight:
670
case
DataGridViewContentAlignment
.TopLeft:
673
case
DataGridViewContentAlignment
.MiddleRight:
676
case
DataGridViewContentAlignment
.MiddleLeft:
679
case
DataGridViewContentAlignment
.BottomRight:
682
case
DataGridViewContentAlignment
.BottomLeft:
691
case
DataGridViewContentAlignment
.TopLeft:
694
case
DataGridViewContentAlignment
.TopRight:
697
case
DataGridViewContentAlignment
.MiddleLeft:
700
case
DataGridViewContentAlignment
.MiddleRight:
703
case
DataGridViewContentAlignment
.BottomLeft:
706
case
DataGridViewContentAlignment
.BottomRight:
714
case
DataGridViewContentAlignment
.TopCenter:
715
case
DataGridViewContentAlignment
.MiddleCenter:
716
case
DataGridViewContentAlignment
.BottomCenter:
723
case
DataGridViewContentAlignment
.TopLeft:
724
case
DataGridViewContentAlignment
.TopCenter:
725
case
DataGridViewContentAlignment
.TopRight:
729
case
DataGridViewContentAlignment
.MiddleLeft:
730
case
DataGridViewContentAlignment
.MiddleCenter:
731
case
DataGridViewContentAlignment
.MiddleRight:
735
case
DataGridViewContentAlignment
.BottomLeft:
736
case
DataGridViewContentAlignment
.BottomCenter:
737
case
DataGridViewContentAlignment
.BottomRight:
742
Debug.Assert(cellStyle.Alignment ==
DataGridViewContentAlignment
.NotSet, "this is the only alignment left");
winforms\Managed\System\WinForms\DataGridViewImageColumn.cs (2)
39
defaultCellStyle.AlignmentInternal =
DataGridViewContentAlignment
.MiddleCenter;
339
defaultCellStyle.Alignment !=
DataGridViewContentAlignment
.MiddleCenter ||
winforms\Managed\System\WinForms\DataGridViewLinkCell.cs (12)
23
private static readonly
DataGridViewContentAlignment
anyLeft =
DataGridViewContentAlignment
.TopLeft |
DataGridViewContentAlignment
.MiddleLeft |
DataGridViewContentAlignment
.BottomLeft;
24
private static readonly
DataGridViewContentAlignment
anyRight =
DataGridViewContentAlignment
.TopRight |
DataGridViewContentAlignment
.MiddleRight |
DataGridViewContentAlignment
.BottomRight;
25
private static readonly
DataGridViewContentAlignment
anyBottom =
DataGridViewContentAlignment
.BottomRight |
DataGridViewContentAlignment
.BottomCenter |
DataGridViewContentAlignment
.BottomLeft;
winforms\Managed\System\WinForms\DataGridViewMethods.cs (3)
2958
if (cellStyle != null && cellStyle.Alignment !=
DataGridViewContentAlignment
.NotSet)
2962
else if (columnHeadersStyle != null && columnHeadersStyle.Alignment !=
DataGridViewContentAlignment
.NotSet)
2968
Debug.Assert(dataGridViewStyle.Alignment !=
DataGridViewContentAlignment
.NotSet);
winforms\Managed\System\WinForms\DataGridViewRow.cs (8)
814
if (cellStyle != null && cellStyle.Alignment !=
DataGridViewContentAlignment
.NotSet)
818
else if (rowHeadersStyle != null && rowHeadersStyle.Alignment !=
DataGridViewContentAlignment
.NotSet)
824
Debug.Assert(dataGridViewStyle.Alignment !=
DataGridViewContentAlignment
.NotSet);
1047
if (rowStyle != null && rowStyle.Alignment !=
DataGridViewContentAlignment
.NotSet)
1051
else if (rowsDefaultCellStyle.Alignment !=
DataGridViewContentAlignment
.NotSet && (rowIndex % 2 == 0 || alternatingRowsDefaultCellStyle.Alignment ==
DataGridViewContentAlignment
.NotSet))
1055
else if (rowIndex % 2 == 1 && alternatingRowsDefaultCellStyle.Alignment !=
DataGridViewContentAlignment
.NotSet)
1061
Debug.Assert(dataGridViewStyle.Alignment !=
DataGridViewContentAlignment
.NotSet);
winforms\Managed\System\WinForms\DataGridViewRowHeaderCell.cs (3)
582
if (cellStyle != null && cellStyle.Alignment !=
DataGridViewContentAlignment
.NotSet)
586
else if (rowHeadersStyle.Alignment !=
DataGridViewContentAlignment
.NotSet)
592
Debug.Assert(dataGridViewStyle.Alignment !=
DataGridViewContentAlignment
.NotSet);
winforms\Managed\System\WinForms\DataGridViewTextBoxCell.cs (27)
201
case
DataGridViewContentAlignment
.TopLeft:
202
case
DataGridViewContentAlignment
.MiddleLeft:
203
case
DataGridViewContentAlignment
.BottomLeft:
217
case
DataGridViewContentAlignment
.TopCenter:
218
case
DataGridViewContentAlignment
.MiddleCenter:
219
case
DataGridViewContentAlignment
.BottomCenter:
224
case
DataGridViewContentAlignment
.TopRight:
225
case
DataGridViewContentAlignment
.MiddleRight:
226
case
DataGridViewContentAlignment
.BottomRight:
243
case
DataGridViewContentAlignment
.TopLeft:
244
case
DataGridViewContentAlignment
.TopCenter:
245
case
DataGridViewContentAlignment
.TopRight:
250
case
DataGridViewContentAlignment
.MiddleLeft:
251
case
DataGridViewContentAlignment
.MiddleCenter:
252
case
DataGridViewContentAlignment
.MiddleRight:
256
case
DataGridViewContentAlignment
.BottomLeft:
257
case
DataGridViewContentAlignment
.BottomCenter:
258
case
DataGridViewContentAlignment
.BottomRight:
285
case
DataGridViewContentAlignment
.TopLeft:
286
case
DataGridViewContentAlignment
.TopCenter:
287
case
DataGridViewContentAlignment
.TopRight:
290
case
DataGridViewContentAlignment
.MiddleLeft:
291
case
DataGridViewContentAlignment
.MiddleCenter:
292
case
DataGridViewContentAlignment
.MiddleRight:
295
case
DataGridViewContentAlignment
.BottomLeft:
296
case
DataGridViewContentAlignment
.BottomCenter:
297
case
DataGridViewContentAlignment
.BottomRight:
winforms\Managed\System\WinForms\DataGridViewTextBoxEditingControl.cs (13)
22
private static readonly
DataGridViewContentAlignment
anyTop =
DataGridViewContentAlignment
.TopLeft |
DataGridViewContentAlignment
.TopCenter |
DataGridViewContentAlignment
.TopRight;
23
private static readonly
DataGridViewContentAlignment
anyRight =
DataGridViewContentAlignment
.TopRight |
DataGridViewContentAlignment
.MiddleRight |
DataGridViewContentAlignment
.BottomRight;
24
private static readonly
DataGridViewContentAlignment
anyCenter =
DataGridViewContentAlignment
.TopCenter |
DataGridViewContentAlignment
.MiddleCenter |
DataGridViewContentAlignment
.BottomCenter;
325
private static HorizontalAlignment TranslateAlignment(
DataGridViewContentAlignment
align)
winforms\Managed\System\WinForms\DataGridViewUtilities.cs (43)
34
internal static System.Drawing.ContentAlignment ComputeDrawingContentAlignmentForCellStyleAlignment(
DataGridViewContentAlignment
alignment)
39
case
DataGridViewContentAlignment
.TopLeft:
41
case
DataGridViewContentAlignment
.TopCenter:
43
case
DataGridViewContentAlignment
.TopRight:
45
case
DataGridViewContentAlignment
.MiddleLeft:
47
case
DataGridViewContentAlignment
.MiddleCenter:
49
case
DataGridViewContentAlignment
.MiddleRight:
51
case
DataGridViewContentAlignment
.BottomLeft:
53
case
DataGridViewContentAlignment
.BottomCenter:
55
case
DataGridViewContentAlignment
.BottomRight:
64
DataGridViewContentAlignment
alignment,
70
case
DataGridViewContentAlignment
.TopLeft:
81
case
DataGridViewContentAlignment
.TopCenter:
84
case
DataGridViewContentAlignment
.TopRight:
95
case
DataGridViewContentAlignment
.MiddleLeft:
106
case
DataGridViewContentAlignment
.MiddleCenter:
109
case
DataGridViewContentAlignment
.MiddleRight:
120
case
DataGridViewContentAlignment
.BottomLeft:
131
case
DataGridViewContentAlignment
.BottomCenter:
134
case
DataGridViewContentAlignment
.BottomRight:
355
DataGridViewContentAlignment
alignment = cellStyle.Alignment;
360
case
DataGridViewContentAlignment
.TopLeft:
361
alignment =
DataGridViewContentAlignment
.TopRight;
364
case
DataGridViewContentAlignment
.TopRight:
365
alignment =
DataGridViewContentAlignment
.TopLeft;
368
case
DataGridViewContentAlignment
.MiddleLeft:
369
alignment =
DataGridViewContentAlignment
.MiddleRight;
372
case
DataGridViewContentAlignment
.MiddleRight:
373
alignment =
DataGridViewContentAlignment
.MiddleLeft;
376
case
DataGridViewContentAlignment
.BottomLeft:
377
alignment =
DataGridViewContentAlignment
.BottomRight;
380
case
DataGridViewContentAlignment
.BottomRight:
381
alignment =
DataGridViewContentAlignment
.BottomLeft;
388
case
DataGridViewContentAlignment
.TopLeft:
393
case
DataGridViewContentAlignment
.TopCenter:
398
case
DataGridViewContentAlignment
.TopRight:
403
case
DataGridViewContentAlignment
.MiddleLeft:
408
case
DataGridViewContentAlignment
.MiddleCenter:
413
case
DataGridViewContentAlignment
.MiddleRight:
418
case
DataGridViewContentAlignment
.BottomLeft:
423
case
DataGridViewContentAlignment
.BottomCenter:
428
case
DataGridViewContentAlignment
.BottomRight:
434
Debug.Assert(cellStyle.Alignment ==
DataGridViewContentAlignment
.NotSet, "this is the only alignment left");