161 references to GetValueOrDefault
System.Windows.Forms (145)
System\Windows\Forms\Control.cs (27)
451
return Properties.
GetValueOrDefault
(
472
return Properties.
GetValueOrDefault
(
572
get => Properties.
GetValueOrDefault
<string>(s_accessibleDefaultActionProperty);
585
get => Properties.
GetValueOrDefault
<string>(s_accessibleDescriptionProperty);
598
get => Properties.
GetValueOrDefault
<string>(s_accessibleNameProperty);
610
get => Properties.
GetValueOrDefault
(s_accessibleRoleProperty, AccessibleRole.Default);
748
get => Properties.
GetValueOrDefault
(s_autoScrollOffsetProperty, Point.Empty);
935
get => Properties.
GetValueOrDefault
<Image>(s_backgroundImageProperty);
965
get => Properties.
GetValueOrDefault
(s_backgroundImageLayoutProperty, ImageLayout.Tile);
1025
Properties.
GetValueOrDefault
<ControlBindingsCollection>(s_bindingsProperty)?.Clear();
1206
int cacheTextCounter = Properties.
GetValueOrDefault
<int>(s_cacheTextCountProperty);
1219
int cacheTextCounter = Properties.
GetValueOrDefault
<int>(s_cacheTextCountProperty);
1236
_text = Properties.
GetValueOrDefault
<string?>(s_cacheTextFieldProperty);
1326
get => Properties.
GetValueOrDefault
<ContextMenuStrip>(s_contextMenuStripProperty);
1576
Cursor? localCursor = Properties.
GetValueOrDefault
<Cursor>(s_cursorProperty);
1907
Font? previous = Properties.
GetValueOrDefault
<Font>(s_fontProperty);
2035
fontHandle = Properties.
GetValueOrDefault
<FontHandleWrapper?>(s_fontHandleWrapperProperty);
2690
string? name = Properties.
GetValueOrDefault
<string>(s_namePropertyProperty);
2760
internal Color RawBackColor => Properties.
GetValueOrDefault
<Color>(s_backColorProperty);
2810
get => Properties.
GetValueOrDefault
<Region>(s_regionProperty);
3204
get => Properties.
GetValueOrDefault
<object>(s_userDataProperty);
4822
Properties.
GetValueOrDefault
<ActiveXImpl>(s_activeXImplProperty)?.Dispose();
6998
Color backColor = Properties.
GetValueOrDefault
<Color>(s_backColorProperty);
7034
if (Equals(Properties.
GetValueOrDefault
<object>(s_dataContextProperty), Parent?.DataContext))
7128
Color foreColor = Properties.
GetValueOrDefault
<Color>(s_foreColorProperty);
10582
Color backColor = Properties.
GetValueOrDefault
<Color>(s_backColorProperty);
10602
internal virtual bool ShouldSerializeForeColor() => !Properties.
GetValueOrDefault
<Color>(s_foreColorProperty).IsEmpty;
System\Windows\Forms\Control.Ime.cs (3)
110
int val = Properties.
GetValueOrDefault
<int>(s_disableImeModeChangedCountProperty);
231
get => Properties.
GetValueOrDefault
<int>(s_imeWmCharsToIgnoreProperty);
250
get => Properties.
GetValueOrDefault
(s_lastCanEnableImeProperty, true);
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (6)
426
get => Properties.
GetValueOrDefault
(s_propDrawMode, DrawMode.Normal);
452
if (Properties.
GetValueOrDefault
<int>(s_propDropDownWidth) != value)
478
if (Properties.
GetValueOrDefault
<int>(s_propDropDownHeight) != value)
615
if (Properties.
GetValueOrDefault
<int>(s_propItemHeight) != value)
700
return Properties.
GetValueOrDefault
<int>(s_propMaxLength);
1060
get => Properties.
GetValueOrDefault
(s_propStyle, ComboBoxStyle.DropDown);
System\Windows\Forms\Controls\DataGridView\DataGridViewBand.cs (4)
58
get => Properties.
GetValueOrDefault
<ContextMenuStrip>(s_propContextMenuStrip);
173
get => Properties.
GetValueOrDefault
<int>(s_propDividerThickness);
262
DataGridViewHeaderCell? priorValue = Properties.
GetValueOrDefault
<DataGridViewHeaderCell?>(s_propHeaderCell);
596
get => Properties.
GetValueOrDefault
<object?>(s_propUserData);
System\Windows\Forms\Controls\DataGridView\DataGridViewButtonCell.cs (3)
40
get => Properties.
GetValueOrDefault
(s_propButtonCellState, ButtonState.Normal);
60
get => Properties.
GetValueOrDefault
(s_propButtonCellFlatStyle, FlatStyle.Standard);
91
get => Properties.
GetValueOrDefault
<bool>(s_propButtonCellUseColumnTextForButtonValue);
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (5)
116
get => Properties.
GetValueOrDefault
<ContextMenuStrip>(s_propCellContextMenuStrip);
658
get => Properties.
GetValueOrDefault
<object?>(s_propCellTag);
1542
string? objErrorText = Properties.
GetValueOrDefault
<string>(s_propCellErrorText);
2432
return Properties.
GetValueOrDefault
<object>(s_propCellValue);
2443
return Properties.
GetValueOrDefault
<object>(s_propCellValue);
System\Windows\Forms\Controls\DataGridView\DataGridViewCellStyle.cs (9)
69
get => Properties.
GetValueOrDefault
(s_propAlignment, DataGridViewContentAlignment.NotSet);
109
get => Properties.
GetValueOrDefault
<Color>(s_propBackColor);
145
get => Properties.
GetValueOrDefault
<Font>(s_propFont);
193
get => Properties.
GetValueOrDefault
<IFormatProvider>(s_propFormatProvider) ?? Globalization.CultureInfo.CurrentCulture;
263
get => Properties.
GetValueOrDefault
<Padding>(s_propPadding);
309
get => Properties.
GetValueOrDefault
<Color>(s_propSelectionBackColor);
323
get => Properties.
GetValueOrDefault
<Color>(s_propSelectionForeColor);
338
get => Properties.
GetValueOrDefault
<object?>(s_propTag);
346
get => Properties.
GetValueOrDefault
(s_propWrapMode, DataGridViewTriState.NotSet);
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxCell.cs (5)
182
get => Properties.
GetValueOrDefault
(s_propButtonCellState, ButtonState.Normal);
209
get => Properties.
GetValueOrDefault
<object?>(s_propFalseValue);
235
get => Properties.
GetValueOrDefault
(s_propFlatStyle, FlatStyle.Standard);
264
get => Properties.
GetValueOrDefault
<object?>(s_propIndeterminateValue);
362
get => Properties.
GetValueOrDefault
<object?>(s_propTrueValue);
System\Windows\Forms\Controls\DataGridView\DataGridViewColumn.cs (1)
791
get => Properties.
GetValueOrDefault
<Type>(s_propDataGridViewColumnValueType);
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (11)
132
get => Properties.
GetValueOrDefault
<object>(s_propComboBoxCellDataSource);
226
get => Properties.
GetValueOrDefault
<PropertyDescriptor?>(s_propComboBoxCellDisplayMemberProp);
233
get => Properties.
GetValueOrDefault
(s_propComboBoxCellDisplayStyle, DataGridViewComboBoxDisplayStyle.DropDownButton);
269
get => Properties.
GetValueOrDefault
<bool>(s_propComboBoxCellDisplayStyleForCurrentCellOnly);
318
get => Properties.
GetValueOrDefault
(s_propComboBoxCellDropDownWidth, 1);
336
get => Properties.
GetValueOrDefault
<DataGridViewComboBoxEditingControl?>(s_propComboBoxCellEditingComboBox);
346
get => Properties.
GetValueOrDefault
(s_propComboBoxCellFlatStyle, FlatStyle.Standard);
378
get => Properties.
GetValueOrDefault
(s_propComboBoxCellMaxDropDownItems, DefaultMaxDropDownItems);
447
get => Properties.
GetValueOrDefault
<DataGridViewComboBoxColumn>(s_propComboBoxCellColumnTemplate);
482
get => Properties.
GetValueOrDefault
<PropertyDescriptor?>(s_propComboBoxCellValueMemberProp);
792
CurrencyManager? cm = Properties.
GetValueOrDefault
<CurrencyManager?>(s_propComboBoxCellDataManager);
System\Windows\Forms\Controls\DataGridView\DataGridViewHeaderCell.cs (4)
31
get => Properties.
GetValueOrDefault
(s_propButtonState, ButtonState.Normal);
80
get => Properties.
GetValueOrDefault
<Bitmap?>(s_propFlipXPThemesBitmap);
157
get => Properties.
GetValueOrDefault
<Type?>(s_propValueType, s_defaultValueType);
425
return Properties.
GetValueOrDefault
<object>(s_propCellValue);
System\Windows\Forms\Controls\DataGridView\DataGridViewImageCell.cs (1)
98
get => Properties.
GetValueOrDefault
(s_propImageCellLayout, DataGridViewImageCellLayout.Normal);
System\Windows\Forms\Controls\DataGridView\DataGridViewLinkCell.cs (4)
117
get => Properties.
GetValueOrDefault
(s_propLinkCellLinkBehavior, LinkBehavior.SystemDefault);
206
get => Properties.
GetValueOrDefault
(s_propLinkCellLinkState, LinkState.Normal);
241
get => Properties.
GetValueOrDefault
(s_propLinkCellTrackVisitedState, true);
272
get => Properties.
GetValueOrDefault
<bool>(s_propLinkCellUseColumnTextForLinkValue);
System\Windows\Forms\Controls\DataGridView\DataGridViewRowHeaderCell.cs (1)
570
return Properties.
GetValueOrDefault
<object?>(s_propCellValue);
System\Windows\Forms\Controls\DataGridView\DataGridViewTextBoxCell.cs (2)
51
get => Properties.
GetValueOrDefault
<DataGridViewTextBoxEditingControl?>(s_propTextBoxCellEditingTextBox);
67
get => Properties.
GetValueOrDefault
(s_propTextBoxCellMaxInputLength, MaxInputLengthDefault);
System\Windows\Forms\Controls\Labels\Label.cs (4)
372
Image? image = Properties.
GetValueOrDefault
<Image>(s_propImage);
507
get => Properties.
GetValueOrDefault
<ImageList>(s_propImageList);
552
get => Properties.
GetValueOrDefault
(s_propImageAlign, ContentAlignment.MiddleCenter);
696
get => Properties.
GetValueOrDefault
(s_propTextAlign, ContentAlignment.TopLeft);
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (1)
1693
ToolStripTextDirection textDirection = Properties.
GetValueOrDefault
(s_propTextDirection, ToolStripTextDirection.Horizontal);
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDown.cs (2)
568
get => Properties.
GetValueOrDefault
(s_propOpacity, 1.0d);
753
get => Properties.
GetValueOrDefault
<Control>(s_propSourceControl);
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (22)
214
get => Properties.
GetValueOrDefault
<string>(s_accessibleDefaultActionDescriptionProperty);
231
get => Properties.
GetValueOrDefault
<string>(s_accessibleDescriptionProperty);
248
get => Properties.
GetValueOrDefault
<string>(s_accessibleNameProperty);
264
get => Properties.
GetValueOrDefault
(s_accessibleRoleProperty, AccessibleRole.Default);
390
get => Properties.
GetValueOrDefault
<Image>(s_backgroundImageProperty);
494
get => Properties.
GetValueOrDefault
(s_backgroundImageLayoutProperty, ImageLayout.Tile);
868
Color foreColor = Properties.
GetValueOrDefault
<Color>(s_foreColorProperty);
1030
Image? image = Properties.
GetValueOrDefault
<Image>(s_imageProperty);
1201
Color color = Properties.
GetValueOrDefault
<Color>(s_foreColorProperty);
1289
get => Properties.
GetValueOrDefault
(s_mergeActionProperty, MergeAction.Append);
1305
get => Properties.
GetValueOrDefault
(s_mergeIndexProperty, -1);
1391
get => WindowsFormsUtils.GetComponentName(this, Properties.
GetValueOrDefault
<string>(s_nameProperty));
1561
Image? image = Properties.
GetValueOrDefault
<Image>(s_imageProperty);
1614
internal Color RawBackColor => Properties.
GetValueOrDefault
(s_backColorProperty, Color.Empty);
1730
return Properties.
GetValueOrDefault
<Image>(s_mirroredImageProperty);
1850
get => Properties.
GetValueOrDefault
<object>(s_tagProperty);
1909
ToolStripTextDirection textDirection = Properties.
GetValueOrDefault
(s_textDirectionProperty, ToolStripTextDirection.Inherit);
2888
Color backColor = Properties.
GetValueOrDefault
<Color>(s_backColorProperty);
2936
Color foreColor = Properties.
GetValueOrDefault
<Color>(s_foreColorProperty);
2977
ToolStripTextDirection textDirection = Properties.
GetValueOrDefault
(s_textDirectionProperty, ToolStripTextDirection.Inherit);
3295
Color backColor = Properties.
GetValueOrDefault
<Color>(s_backColorProperty);
3309
Color foreColor = Properties.
GetValueOrDefault
<Color>(s_foreColorProperty);
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.cs (3)
302
get => Properties.
GetValueOrDefault
(s_propCheckState, CheckState.Unchecked);
359
get => Properties.
GetValueOrDefault
(s_propShortcutKeys, Keys.None);
480
internal Form? MdiForm => Properties.
GetValueOrDefault
<Form>(s_propMdiForm);
System\Windows\Forms\Form.cs (23)
219
get => Properties.
GetValueOrDefault
<IButtonControl?>(s_propAcceptButton);
334
get => Properties.
GetValueOrDefault
<Form>(s_propActiveMdiChild);
342
get => Properties.
GetValueOrDefault
<Form>(s_propFormerlyActiveMdiChild);
711
get => Properties.
GetValueOrDefault
<IButtonControl>(s_propCancelButton);
801
Form? formMdiParent = Properties.
GetValueOrDefault
<Form>(s_propFormMdiParent);
1074
get => Properties.
GetValueOrDefault
<bool>(s_propMdiChildFocusable);
1156
get => Properties.
GetValueOrDefault
<Rectangle>(s_propMaximizedBounds);
1258
get => Properties.
GetValueOrDefault
<MenuStrip>(s_propMainMenuStrip);
1450
get => Properties.
GetValueOrDefault
<Form>(s_propFormMdiParent);
1453
Form? formMdiParent = Properties.
GetValueOrDefault
<Form>(s_propFormMdiParent);
1522
get => Properties.
GetValueOrDefault
<MdiWindowListStrip>(s_propMdiWindowListStrip);
1528
get => Properties.
GetValueOrDefault
<MdiControlStrip>(s_propMdiControlStrip);
1567
get => Properties.
GetValueOrDefault
(s_propOpacity, 1.0d);
1654
internal Form? OwnerInternal => Properties.
GetValueOrDefault
<Form?>(s_propOwner);
1759
get => Properties.
GetValueOrDefault
(s_propFormScreenCaptureMode, ScreenCaptureMode.Allow);
2084
get => Properties.
GetValueOrDefault
(s_propTransparencyKey, Color.Empty);
2267
get => Properties.
GetValueOrDefault
(s_propFormCornerPreference, FormCornerPreference.Default);
2359
get => Properties.
GetValueOrDefault
(s_propFormBorderColor, Color.Empty);
2421
get => Properties.
GetValueOrDefault
(s_propFormCaptionBackColor, Color.Empty);
2484
get => Properties.
GetValueOrDefault
(s_propFormCaptionTextColor, Color.Empty);
3360
Form? form = Properties.
GetValueOrDefault
<Form>(s_propFormMdiParent);
3724
IWin32Window? dialogOwner = Properties.
GetValueOrDefault
<IWin32Window>(s_propDialogOwner);
5356
IButtonControl? existing = Properties.
GetValueOrDefault
<IButtonControl>(s_propDefaultButton);
System\Windows\Forms\Layout\CommonProperties.cs (1)
723
element.Properties.
GetValueOrDefault
<BitVector32>(s_layoutStateProperty);
System\Windows\Forms\Layout\Containers\ContainerControl.cs (1)
571
private void AxContainerFormCreated() => Properties.
GetValueOrDefault
<AxHost.AxContainer>(s_propAxContainer)?.FormCreated();
System\Windows\Forms\Layout\DefaultLayout.cs (1)
1085
element.Properties.
GetValueOrDefault
<AnchorInfo>(s_layoutInfoProperty);
System\Windows\Forms\Layout\FlowLayout.cs (1)
293
container.Properties.
GetValueOrDefault
<FlowDirection>(s_flowDirectionProperty);
System.Windows.Forms.Tests (16)
System\Windows\Forms\PropertyStoreTests.cs (16)
238
value.Should().Be(store.
GetValueOrDefault
<bool>(1));
248
value.Should().Be(store.
GetValueOrDefault
<byte>(1));
258
value.Should().Be(store.
GetValueOrDefault
<sbyte>(1));
268
value.Should().Be(store.
GetValueOrDefault
<char>(1));
278
value.Should().Be(store.
GetValueOrDefault
<decimal>(1));
288
value.Should().Be(store.
GetValueOrDefault
<double>(1));
298
value.Should().Be(store.
GetValueOrDefault
<float>(1));
308
value.Should().Be(store.
GetValueOrDefault
<int>(1));
318
value.Should().Be(store.
GetValueOrDefault
<uint>(1));
328
value.Should().Be(store.
GetValueOrDefault
<long>(1));
338
value.Should().Be(store.
GetValueOrDefault
<ulong>(1));
348
value.Should().Be(store.
GetValueOrDefault
<short>(1));
358
value.Should().Be(store.
GetValueOrDefault
<ushort>(1));
368
value.Should().Be(store.
GetValueOrDefault
<object>(1));
378
value.Should().Be(store.
GetValueOrDefault
<Color>(1));
388
value.Should().Be(store.
GetValueOrDefault
<FormWindowState>(1));