1 write to Properties
System.Windows.Forms (1)
System\Windows\Forms\Control.cs (1)
310
Properties
= new PropertyStore();
313 references to Properties
System.Windows.Forms (307)
System\Windows\Forms\ActiveX\Control.ActiveXImpl.cs (2)
83
if (!
Properties
.TryGetValue(s_activeXImplProperty, out ActiveXImpl? activeXImpl))
94
activeXImpl =
Properties
.AddValue(s_activeXImplProperty, new ActiveXImpl(this));
System\Windows\Forms\Control.cs (132)
316
Properties
.AddValue(
451
return
Properties
.GetValueOrDefault(
460
Properties
.AddOrRemoveValue(
472
return
Properties
.GetValueOrDefault(
481
Properties
.AddOrRemoveValue(
526
if (!
Properties
.TryGetValue(s_accessibilityProperty, out AccessibleObject? accessibleObject))
529
Properties
.AddValue(s_accessibilityProperty, accessibleObject);
545
if (!
Properties
.TryGetValue(s_ncAccessibilityProperty, out AccessibleObject? ncAccessibleObject))
548
Properties
.AddValue(s_ncAccessibilityProperty, ncAccessibleObject);
572
get =>
Properties
.GetValueOrDefault<string>(s_accessibleDefaultActionProperty);
573
set =>
Properties
.AddOrRemoveValue(s_accessibleDefaultActionProperty, value);
585
get =>
Properties
.GetValueOrDefault<string>(s_accessibleDescriptionProperty);
586
set =>
Properties
.AddOrRemoveValue(s_accessibleDescriptionProperty, value);
598
get =>
Properties
.GetValueOrDefault<string>(s_accessibleNameProperty);
599
set =>
Properties
.AddOrRemoveValue(s_accessibleNameProperty, value);
610
get =>
Properties
.GetValueOrDefault(s_accessibleRoleProperty, AccessibleRole.Default);
614
Properties
.AddOrRemoveValue(s_accessibleRoleProperty, value, defaultValue: AccessibleRole.Default);
662
if (
Properties
.TryGetValueOrNull(s_ambientPropertiesServiceProperty, out AmbientProperties? ambientProperties))
671
Properties
.AddValue(s_ambientPropertiesServiceProperty, ambientProperties);
748
get =>
Properties
.GetValueOrDefault(s_autoScrollOffsetProperty, Point.Empty);
749
set =>
Properties
.AddOrRemoveValue(s_autoScrollOffsetProperty, value, defaultValue: Point.Empty);
770
if (
Properties
.TryGetValue(s_backBrushProperty, out HBRUSH customBackBrush))
776
if (!
Properties
.ContainsKey(s_backColorProperty))
804
Properties
.AddValue(s_backBrushProperty, backBrush);
829
get =>
Properties
.TryGetValue(s_dataContextProperty, out object? value)
841
if (
Properties
.ContainsKey(s_dataContextProperty) && Equals(ParentInternal?.DataContext, value))
843
Properties
.RemoveValue(s_dataContextProperty);
848
Properties
.AddValue(s_dataContextProperty, value);
854
=>
Properties
.ContainsKey(s_dataContextProperty);
857
=>
Properties
.RemoveValue(s_dataContextProperty);
910
Properties
.AddOrRemoveValue(s_backColorProperty, value);
935
get =>
Properties
.GetValueOrDefault<Image>(s_backgroundImageProperty);
943
Properties
.AddOrRemoveValue(s_backgroundImageProperty, value);
965
get =>
Properties
.GetValueOrDefault(s_backgroundImageLayoutProperty, ImageLayout.Tile);
987
Properties
.AddOrRemoveValue(s_backgroundImageLayoutProperty, value, defaultValue: ImageLayout.Tile);
1025
Properties
.GetValueOrDefault<ControlBindingsCollection>(s_bindingsProperty)?.Clear();
1038
if (
Properties
.TryGetValue(s_bindingManagerProperty, out BindingContext? context))
1055
BindingContext? oldContext =
Properties
.AddOrRemoveValue(s_bindingManagerProperty, value);
1206
int cacheTextCounter =
Properties
.GetValueOrDefault<int>(s_cacheTextCountProperty);
1219
int cacheTextCounter =
Properties
.GetValueOrDefault<int>(s_cacheTextCountProperty);
1225
Properties
.AddOrRemoveValue(s_cacheTextFieldProperty, _text);
1236
_text =
Properties
.GetValueOrDefault<string?>(s_cacheTextFieldProperty);
1240
Properties
.AddOrRemoveValue(s_cacheTextCountProperty, cacheTextCounter);
1326
get =>
Properties
.GetValueOrDefault<ContextMenuStrip>(s_contextMenuStripProperty);
1329
ContextMenuStrip? oldValue =
Properties
.AddOrRemoveValue(s_contextMenuStripProperty, value);
1528
internal bool IsAccessibilityObjectCreated =>
Properties
.ContainsKey(s_accessibilityProperty);
1556
if (
Properties
.TryGetValue(s_cursorProperty, out Cursor? cursor))
1569
Cursor? localCursor =
Properties
.GetValueOrDefault<Cursor>(s_cursorProperty);
1573
Properties
.AddOrRemoveValue(s_cursorProperty, value);
1621
if (!
Properties
.TryGetValue(s_bindingsProperty, out ControlBindingsCollection? bindings))
1623
bindings =
Properties
.AddValue(s_bindingsProperty, new ControlBindingsCollection(this));
1754
if (
Properties
.TryGetValue(s_fontHandleWrapperProperty, out FontHandleWrapper? fontHandle))
1757
Properties
.RemoveValue(s_fontHandleWrapperProperty);
1900
Font? previous =
Properties
.GetValueOrDefault<Font>(s_fontProperty);
1909
Properties
.AddOrRemoveValue(s_fontProperty, value);
1934
if (
Properties
.ContainsKey(s_fontHeightProperty))
1936
Properties
.AddValue(s_fontHeightProperty, (value is null) ? -1 : value.Height);
2009
if (!
Properties
.TryGetValue(s_fontHandleWrapperProperty, out FontHandleWrapper? fontHandle))
2011
fontHandle =
Properties
.AddValue(s_fontHandleWrapperProperty, new FontHandleWrapper(font));
2026
if (
Properties
.TryGetValue(s_currentAmbientFontProperty, out Font? currentAmbient) && currentAmbient == ambientFont)
2028
fontHandle =
Properties
.GetValueOrDefault<FontHandleWrapper?>(s_fontHandleWrapperProperty);
2032
Properties
.AddValue(s_currentAmbientFontProperty, ambientFont);
2035
fontHandle ??=
Properties
.AddValue(s_fontHandleWrapperProperty, new FontHandleWrapper(ambientFont));
2049
if (
Properties
.TryGetValue(s_fontHeightProperty, out int fontHeight) && fontHeight != -1)
2056
return
Properties
.AddValue(s_fontHeightProperty, font.Height);
2071
Properties
.AddValue(s_fontHeightProperty, localFontHeight);
2076
set =>
Properties
.AddValue(s_fontHeightProperty, value);
2089
Properties
.TryGetValue(s_foreColorProperty, out Color color);
2119
Properties
.AddOrRemoveValue(s_foreColorProperty, value);
2683
string? name =
Properties
.GetValueOrDefault<string>(s_namePropertyProperty);
2691
set =>
Properties
.AddOrRemoveString(s_namePropertyProperty, value);
2753
internal Color RawBackColor =>
Properties
.GetValueOrDefault<Color>(s_backColorProperty);
2803
get =>
Properties
.GetValueOrDefault<Region>(s_regionProperty);
2817
Region? oldRegion =
Properties
.AddOrRemoveValue(s_regionProperty, region);
2943
if (!
Properties
.TryGetValue(s_rightToLeftProperty, out RightToLeft rightToLeft)
2958
if (
Properties
.ContainsKey(s_rightToLeftProperty) || value != RightToLeft.Inherit)
2960
Properties
.AddValue(s_rightToLeftProperty, value);
3007
if (
Properties
.ContainsKey(s_fontHeightProperty))
3009
Properties
.AddValue(s_fontHeightProperty, (value is null) ? -1 : value.Height);
3031
bool checkFont = !
Properties
.ContainsKey(s_fontProperty);
3032
bool checkBackColor = !
Properties
.ContainsKey(s_backColorProperty);
3033
bool checkForeColor = !
Properties
.ContainsKey(s_foreColorProperty);
3034
bool checkCursor = !
Properties
.ContainsKey(s_cursorProperty);
3061
Properties
.AddValue(s_ambientPropertiesServiceProperty, newAmbients);
3197
get =>
Properties
.GetValueOrDefault<object>(s_userDataProperty);
3198
set =>
Properties
.AddOrRemoveValue(s_userDataProperty, value);
3234
if (control.IsActiveX && control.
Properties
.TryGetValue(s_activeXImplProperty, out ActiveXImpl? activeX))
3476
get =>
Properties
.TryGetValue(s_useCompatibleTextRenderingProperty, out bool value)
3483
Properties
.AddValue(s_useCompatibleTextRenderingProperty, value);
3507
if (!
Properties
.TryGetValue(s_controlVersionInfoProperty, out ControlVersionInfo? info))
3510
Properties
.AddValue(s_controlVersionInfoProperty, info);
4294
if (!
Properties
.ContainsKey(s_bindingManagerProperty) && Created)
4631
if (!
Properties
.ContainsKey(s_bindingManagerProperty) && ParentInternal is not null && !controlIsAlreadyCreated)
4774
if (
Properties
.TryGetValue(s_backBrushProperty, out HBRUSH backBrush))
4781
Properties
.RemoveValue(s_backBrushProperty);
4786
if (
Properties
?.TryGetValue(s_contextMenuStripProperty, out ContextMenuStrip? menu) == true)
4812
Properties
?.RemoveValue(s_ncAccessibilityProperty);
4815
Properties
?.GetValueOrDefault<ActiveXImpl>(s_activeXImplProperty)?.Dispose();
6269
internal bool IsFontSet() =>
Properties
.ContainsKey(s_fontProperty);
6670
if (
Properties
.TryGetValue(s_backBrushProperty, out HBRUSH backBrush))
6680
Properties
.RemoveValue(s_backBrushProperty);
6742
if (
Properties
.ContainsKey(s_bindingsProperty))
6895
if (
Properties
.ContainsKey(s_fontHeightProperty))
6897
Properties
.AddValue(s_fontHeightProperty, -1);
6993
Color backColor =
Properties
.GetValueOrDefault<Color>(s_backColorProperty);
7009
if (!
Properties
.ContainsKey(s_bindingManagerProperty))
7018
if (!
Properties
.ContainsKey(s_cursorProperty))
7027
if (
Properties
.ContainsKey(s_dataContextProperty))
7029
if (Equals(
Properties
.GetValueOrDefault<object>(s_dataContextProperty), Parent?.DataContext))
7032
Properties
.RemoveValue(s_dataContextProperty);
7123
Color foreColor =
Properties
.GetValueOrDefault<Color>(s_foreColorProperty);
7133
if (!
Properties
.TryGetValue(s_rightToLeftProperty, out RightToLeft rightToLeft) || rightToLeft == RightToLeft.Inherit)
7373
if (
Properties
.TryGetValue(s_accessibilityProperty, out ControlAccessibleObject? clientAccessibleObject))
7380
if (
Properties
.TryGetValue(s_ncAccessibilityProperty, out ControlAccessibleObject? nonClientAccessibleObject))
7435
Properties
.AddOrRemoveValue(s_deviceDpiInternal, (int)PInvoke.GetDpiForWindow(this));
7521
if (
Properties
.TryGetValue(s_accessibilityProperty, out ControlAccessibleObject? accObj))
7528
if (
Properties
.TryGetValue(s_ncAccessibilityProperty, out ControlAccessibleObject? nonClientAccessibleObject))
7535
if (!RecreatingHandle && GetState(States.OwnCtlBrush) &&
Properties
.TryGetValue(s_backBrushProperty, out HBRUSH backBrush))
7537
Properties
.RemoveValue(s_backBrushProperty);
9456
Properties
.RemoveValue(s_accessibilityProperty);
9460
Properties
.TryGetValue(s_accessibilityProperty, out accessibleObject);
10572
Color backColor =
Properties
.GetValueOrDefault<Color>(s_backColorProperty);
10580
internal virtual bool ShouldSerializeCursor() =>
Properties
.ContainsKey(s_cursorProperty);
10592
internal virtual bool ShouldSerializeForeColor() => !
Properties
.GetValueOrDefault<Color>(s_foreColorProperty).IsEmpty;
10598
internal virtual bool ShouldSerializeFont() =>
Properties
.ContainsKey(s_fontProperty);
10605
Properties
.TryGetValue(s_rightToLeftProperty, out RightToLeft rightToLeft)
10791
Properties
.TryGetValue(s_fontProperty, out font);
10803
Properties
.AddOrRemoveValue(s_fontProperty, scaledFont);
10808
if (
Properties
.ContainsKey(s_fontHeightProperty))
10810
Properties
.AddValue(s_fontHeightProperty, scaledFont.Height);
11204
if (!
Properties
.TryGetValue(s_contextMenuStripProperty, out ContextMenuStrip? contextMenuStrip))
12713
get { return
Properties
; }
System\Windows\Forms\Control.Ime.cs (10)
38
if (!
Properties
.TryGetValue(s_imeModeProperty, out ImeMode cachedImeMode))
63
Properties
.AddValue(s_imeModeProperty, value);
110
int val =
Properties
.GetValueOrDefault<int>(s_disableImeModeChangedCountProperty);
114
set =>
Properties
.AddValue(s_disableImeModeChangedCountProperty, value);
231
get =>
Properties
.GetValueOrDefault<int>(s_imeWmCharsToIgnoreProperty);
238
Properties
.AddValue(s_imeWmCharsToIgnoreProperty, value);
250
get =>
Properties
.GetValueOrDefault(s_lastCanEnableImeProperty, true);
251
set =>
Properties
.AddOrRemoveValue(s_lastCanEnableImeProperty, value, defaultValue: true);
501
return
Properties
.TryGetValue(s_imeModeProperty, out ImeMode imeMode) && imeMode != DefaultImeMode;
627
Properties
.AddValue(s_imeWmCharsToIgnoreProperty, ImeCharsToIgnoreEnabled);
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (25)
415
get =>
Properties
.GetValueOrDefault(s_propDrawMode, DrawMode.Normal);
423
Properties
.AddOrRemoveValue(s_propDrawMode, value, defaultValue: DrawMode.Normal);
436
get =>
Properties
.TryGetValue(s_propDropDownWidth, out int dropDownWidth) ? dropDownWidth : Width;
441
if (
Properties
.GetValueOrDefault<int>(s_propDropDownWidth) != value)
443
Properties
.AddValue(s_propDropDownWidth, value);
462
get =>
Properties
.TryGetValue(s_propDropDownHeight, out int dropDownHeight) ? dropDownHeight : DefaultDropDownHeight;
467
if (
Properties
.GetValueOrDefault<int>(s_propDropDownHeight) != value)
469
Properties
.AddValue(s_propDropDownHeight, value);
589
return
Properties
.TryGetValue(s_propItemHeight, out int itemHeight) ? itemHeight : FontHeight + 2;
604
if (
Properties
.GetValueOrDefault<int>(s_propItemHeight) != value)
606
Properties
.AddValue(s_propItemHeight, value);
638
get =>
Properties
.GetStringOrEmptyString(s_propMatchingText);
639
set =>
Properties
.AddOrRemoveString(s_propMatchingText, value);
689
return
Properties
.GetValueOrDefault<int>(s_propMaxLength);
700
Properties
.AddValue(s_propMaxLength, value);
1049
get =>
Properties
.GetValueOrDefault(s_propStyle, ComboBoxStyle.DropDown);
1069
Properties
.AddOrRemoveValue(s_propStyle, value, defaultValue: ComboBoxStyle.DropDown);
2304
if (
Properties
.TryGetValue(s_propDropDownWidth, out int dropDownWidth))
2309
if (
Properties
.ContainsKey(s_propItemHeight))
3075
Properties
.RemoveValue(s_propDropDownWidth);
3080
Properties
.RemoveValue(s_propItemHeight);
3304
internal bool ShouldSerializeDropDownWidth() =>
Properties
.ContainsKey(s_propDropDownWidth);
3309
internal bool ShouldSerializeItemHeight() =>
Properties
.ContainsKey(s_propItemHeight);
3888
if (!
Properties
.TryGetValue(s_propFlatComboAdapter, out FlatComboAdapter? comboAdapter) || !comboAdapter.IsValid(this))
3891
Properties
.AddValue(s_propFlatComboAdapter, comboAdapter);
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (2)
2957
if (!
Properties
.TryGetValue(s_propToolTip, out ToolTip? toolTip))
2959
toolTip =
Properties
.AddValue(
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (1)
5577
if (
Properties
.TryGetValue(s_propToolTip, out ToolTip? keyboardToolTip))
System\Windows\Forms\Controls\Labels\Label.cs (17)
370
Image? image =
Properties
.GetValueOrDefault<Image>(s_propImage);
390
Properties
.AddOrRemoveValue(s_propImage, value);
443
Properties
.RemoveValue(s_propImage);
473
Properties
.RemoveValue(s_propImage);
485
if (!
Properties
.TryGetValue(s_propImageIndex, out LabelImageIndexer? imageIndexer))
493
set =>
Properties
.AddOrRemoveValue(s_propImageIndex, value);
505
get =>
Properties
.GetValueOrDefault<ImageList>(s_propImageList);
525
Properties
.RemoveValue(s_propImage);
528
Properties
.AddOrRemoveValue(s_propImageList, value);
550
get =>
Properties
.GetValueOrDefault(s_propImageAlign, ContentAlignment.MiddleCenter);
557
Properties
.AddOrRemoveValue(s_propImageAlign, value, defaultValue: ContentAlignment.MiddleCenter);
694
get =>
Properties
.GetValueOrDefault(s_propTextAlign, ContentAlignment.TopLeft);
701
Properties
.AddOrRemoveValue(s_propTextAlign, value, defaultValue: ContentAlignment.TopLeft);
854
if (animate == currentlyAnimating || !
Properties
.TryGetValue(s_propImage, out Image? image))
951
Properties
.RemoveValue(s_propImageList);
954
Properties
.RemoveValue(s_propImage);
1404
private bool ShouldSerializeImage() =>
Properties
.ContainsKey(s_propImage);
System\Windows\Forms\Controls\ListView\ListView.cs (6)
2229
if (
Properties
.TryGetValue(s_propDelayedUpdateItems, out List<ListViewItem>? newItems))
2232
Properties
.RemoveValue(s_propDelayedUpdateItems);
2363
if (_updateCounter++ == 0 && !
Properties
.ContainsKey(s_propDelayedUpdateItems))
2365
Properties
.AddValue(s_propDelayedUpdateItems, new List<ListViewItem>());
3165
if (--_updateCounter == 0 &&
Properties
.ContainsKey(s_propDelayedUpdateItems))
4011
if (_updateCounter > 0 &&
Properties
.TryGetValue(s_propDelayedUpdateItems, out List<ListViewItem>? itemList))
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (12)
382
if (
Properties
.TryGetValue(s_propBindingContext, out BindingContext? context))
398
if (
Properties
.AddOrRemoveValue(s_propBindingContext, value) != value)
1396
if (!IsDropDown && !IsDisposed && !
Properties
.TryGetValue(s_propToolStripPanelCell, out toolStripPanelCell))
1398
toolStripPanelCell =
Properties
.AddValue(s_propToolStripPanelCell, new ToolStripPanelCell(this));
1671
if (!
Properties
.TryGetValue(s_propToolTip, out ToolTip? toolTip))
1673
toolTip =
Properties
.AddValue(s_propToolTip, new ToolTip());
1687
ToolStripTextDirection textDirection =
Properties
.GetValueOrDefault(s_propTextDirection, ToolStripTextDirection.Horizontal);
1699
Properties
.AddOrRemoveValue(s_propTextDirection, value, defaultValue: ToolStripTextDirection.Horizontal);
1886
if (
Properties
.TryGetValue(s_propToolStripPanelCell, out ToolStripPanelCell? toolStripPanelCell))
1889
Properties
.RemoveValue(s_propToolStripPanelCell);
1896
if (
Properties
.TryGetValue(s_propToolTip, out ToolTip? toolTip))
1899
Properties
.RemoveValue(s_propToolTip);
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDown.cs (5)
85
Properties
.RemoveValue(s_propOpacity);
568
get =>
Properties
.GetValueOrDefault(s_propOpacity, 1.0d);
573
Properties
.AddOrRemoveValue(s_propOpacity, value, 1.0d);
753
get =>
Properties
.GetValueOrDefault<Control>(s_propSourceControl);
754
set =>
Properties
.AddOrRemoveValue(s_propSourceControl, value);
System\Windows\Forms\Controls\ToolStrips\ToolStripOverflow.cs (1)
72
get { return
Properties
; }
System\Windows\Forms\Controls\ToolStrips\ToolStripPanel.cs (2)
274
if (!
Properties
.TryGetValue(s_propToolStripPanelRowCollection, out ToolStripPanelRowCollection? rowCollection))
276
rowCollection =
Properties
.AddValue(s_propToolStripPanelRowCollection, CreateToolStripPanelRowCollection());
System\Windows\Forms\Form.cs (88)
218
get =>
Properties
.GetValueOrDefault<IButtonControl?>(s_propAcceptButton);
221
if (
Properties
.AddOrRemoveValue(s_propAcceptButton, value) != value)
333
get =>
Properties
.GetValueOrDefault<Form>(s_propActiveMdiChild);
334
set =>
Properties
.AddOrRemoveValue(s_propActiveMdiChild, value);
341
get =>
Properties
.GetValueOrDefault<Form>(s_propFormerlyActiveMdiChild);
342
set =>
Properties
.AddOrRemoveValue(s_propFormerlyActiveMdiChild, value);
369
Properties
.RemoveValue(s_propOpacity);
371
if (
Properties
.ContainsKey(s_propTransparencyKey))
373
Properties
.AddValue(s_propTransparencyKey, Color.Empty);
710
get =>
Properties
.GetValueOrDefault<IButtonControl>(s_propCancelButton);
713
Properties
.AddOrRemoveValue(s_propCancelButton, value);
776
if (
Properties
.TryGetValue(s_propDialogOwner, out IWin32Window? dialogOwner))
800
Form? formMdiParent =
Properties
.GetValueOrDefault<Form>(s_propFormMdiParent);
1067
public bool IsMdiChild =>
Properties
.ContainsKey(s_propFormMdiParent);
1073
get =>
Properties
.GetValueOrDefault<bool>(s_propMdiChildFocusable);
1074
set =>
Properties
.AddOrRemoveValue(s_propMdiChildFocusable, value);
1155
get =>
Properties
.GetValueOrDefault<Rectangle>(s_propMaximizedBounds);
1160
Properties
.AddValue(s_propMaximizedBounds, value);
1186
get =>
Properties
.TryGetValue(s_propMaxTrackSize, out Size maximumSize) ? maximumSize : Size.Empty;
1203
Properties
.AddValue(s_propMaxTrackSize, value);
1224
Properties
.AddValue(s_propMinTrackSize, minimumSize);
1257
get =>
Properties
.GetValueOrDefault<MenuStrip>(s_propMainMenuStrip);
1260
Properties
.AddOrRemoveValue(s_propMainMenuStrip, value);
1299
get =>
Properties
.TryGetValue(s_propMinTrackSize, out Size minimumSize) ? minimumSize : DefaultMinimumSize;
1320
Properties
.AddValue(s_propMinTrackSize, value);
1341
Properties
.AddValue(s_propMaxTrackSize, maximumSize);
1449
get =>
Properties
.GetValueOrDefault<Form>(s_propFormMdiParent);
1452
Form? formMdiParent =
Properties
.GetValueOrDefault<Form>(s_propFormMdiParent);
1491
Properties
.AddOrRemoveValue(s_propFormMdiParent, value);
1521
get =>
Properties
.GetValueOrDefault<MdiWindowListStrip>(s_propMdiWindowListStrip);
1522
set =>
Properties
.AddOrRemoveValue(s_propMdiWindowListStrip, value);
1527
get =>
Properties
.GetValueOrDefault<MdiControlStrip>(s_propMdiControlStrip);
1528
set =>
Properties
.AddOrRemoveValue(s_propMdiControlStrip, value);
1566
get =>
Properties
.GetValueOrDefault(s_propOpacity, 1.0d);
1571
Properties
.AddOrRemoveValue(s_propOpacity, value, defaultValue: 1.0d);
1613
public Form[] OwnedForms =>
Properties
.TryGetValue(s_propOwnedForms, out List<Form>? ownedForms) ? ([.. ownedForms]) : ([]);
1641
Properties
.RemoveValue(s_propOwner);
1645
Properties
.AddOrRemoveValue(s_propOwner, value);
1653
internal Form? OwnerInternal =>
Properties
.GetValueOrDefault<Form?>(s_propOwner);
1758
get =>
Properties
.GetValueOrDefault(s_propFormScreenCaptureMode, ScreenCaptureMode.Allow);
1772
Properties
.AddOrRemoveValue(s_propFormScreenCaptureMode, value);
2083
get =>
Properties
.GetValueOrDefault(s_propTransparencyKey, Color.Empty);
2086
Properties
.AddOrRemoveValue(s_propTransparencyKey, value, defaultValue: Color.Empty);
2265
get =>
Properties
.GetValueOrDefault(s_propFormCornerPreference, FormCornerPreference.Default);
2282
Properties
.AddOrRemoveValue(s_propFormCornerPreference, value, defaultValue: FormCornerPreference.Default);
2353
get =>
Properties
.GetValueOrDefault(s_propFormBorderColor, Color.Empty);
2361
Properties
.AddOrRemoveValue(s_propFormBorderColor, value, defaultValue: Color.Empty);
2413
get =>
Properties
.GetValueOrDefault(s_propFormCaptionBackColor, Color.Empty);
2421
Properties
.AddOrRemoveValue(s_propFormCaptionBackColor, value, defaultValue: Color.Empty);
2474
get =>
Properties
.GetValueOrDefault(s_propFormCaptionTextColor, Color.Empty);
2482
Properties
.AddOrRemoveValue(s_propFormCaptionTextColor, value, defaultValue: Color.Empty);
2891
if (!
Properties
.TryGetValue(s_propOwnedForms, out List<Form>? ownedForms))
2894
Properties
.AddValue(s_propOwnedForms, ownedForms);
3158
if (
Properties
.TryGetValue(s_propFormMdiParent, out Form? formMdiParent) && formMdiParent.MdiClient != value)
3160
Properties
.RemoveValue(s_propFormMdiParent);
3345
Form? form =
Properties
.GetValueOrDefault<Form>(s_propFormMdiParent);
3520
Properties
.RemoveValue(s_propAcceptButton);
3521
Properties
.RemoveValue(s_propCancelButton);
3522
Properties
.RemoveValue(s_propDefaultButton);
3523
Properties
.RemoveValue(s_propActiveMdiChild);
3537
if (
Properties
.TryGetValue(s_propOwner, out Form? owner))
3540
Properties
.RemoveValue(s_propOwner);
3543
Properties
.RemoveValue(s_propDialogOwner);
3545
if (
Properties
.TryGetValue(s_propOwnedForms, out List<Form>? ownedForms))
3560
if (
Properties
.TryGetValue(s_propDummyMdiMenu, out HMENU dummyMenu))
3562
Properties
.RemoveValue(s_propDummyMdiMenu);
3709
IWin32Window? dialogOwner =
Properties
.GetValueOrDefault<IWin32Window>(s_propDialogOwner);
4741
if (
Properties
.TryGetValue(s_propDefaultButton, out IButtonControl? button))
4754
if (
Properties
.TryGetValue(s_propCancelButton, out button))
4847
if (
Properties
.TryGetValue(s_propOwnedForms, out List<Form>? ownedForms))
4875
if (
Properties
.TryGetValue(s_propOwnedForms, out List<Form>? ownedForms))
4968
if (
Properties
.TryGetValue(s_propFormBorderColor, out Color? formBorderColor))
4973
if (
Properties
.TryGetValue(s_propFormCaptionBackColor, out Color? formCaptionBackColor))
4978
if (
Properties
.TryGetValue(s_propFormCaptionTextColor, out Color? formCaptionTextColor))
4983
if (
Properties
.TryGetValue(s_propFormCornerPreference, out FormCornerPreference? cornerPreference))
5008
if (
Properties
.TryGetValue(s_propOwnedForms, out List<Form>? ownedForms))
5339
IButtonControl? existing =
Properties
.GetValueOrDefault<IButtonControl>(s_propDefaultButton);
5345
Properties
.AddOrRemoveValue(s_propDefaultButton, button);
5479
Properties
.AddOrRemoveValue(s_propDialogOwner, owner);
5754
Properties
.AddOrRemoveValue(s_propDialogOwner, owner);
5815
Properties
.RemoveValue(s_propDialogOwner);
6116
if (
Properties
.TryGetValue(s_propOwner, out Form? owner))
6192
if (!
Properties
.TryGetValue(s_propDummyMdiMenu, out HMENU dummyMenu) || recreateMenu)
6197
Properties
.AddValue(s_propDummyMdiMenu, dummyMenu);
6736
if (
Properties
.TryGetValue(s_propOwnedForms, out List<Form>? ownedForms))
6805
if (
Properties
.TryGetValue(s_propOwnedForms, out List<Form>? ownedForms))
6939
Debug.Assert(
Properties
.ContainsKey(s_propFormMdiParent), "how is formMdiParent null?");
6942
if (
Properties
.TryGetValue(s_propFormMdiParent, out Form? formMdiParent))
System\Windows\Forms\Layout\Containers\ContainerControl.cs (4)
571
private void AxContainerFormCreated() =>
Properties
.GetValueOrDefault<AxHost.AxContainer>(s_propAxContainer)?.FormCreated();
580
if (!
Properties
.TryGetValue(s_propAxContainer, out AxHost.AxContainer? container))
582
container =
Properties
.AddValue(s_propAxContainer, new AxHost.AxContainer(this));
838
if (
Properties
.ContainsKey(s_propAxContainer))
System.Windows.Forms.Tests (6)
System\Windows\Forms\ListViewTests.cs (5)
5156
listView.
Properties
.AddValue(accessibilityProperty, accessibleObject);
5181
listView.
Properties
.AddValue(accessibilityProperty, accessibleObject);
5206
listView.
Properties
.AddValue(accessibilityProperty, accessibleObject);
5233
listView.
Properties
.AddValue(accessibilityProperty, accessibleObject);
5407
listView.
Properties
.AddValue(accessibilityProperty, accessibleObject);
System\Windows\Forms\PropertyGridInternal\AccessibleObjects\PropertyDescriptorGridEntry.PropertyDescriptorGridEntryAccessibleObjectTests.cs (1)
21
propertyGridView.
Properties
.AddValue(propertyGrid.TestAccessor.Dynamic.s_accessibilityProperty, accessibleObject);