1 write to Properties
System.Windows.Forms (1)
System\Windows\Forms\Control.cs (1)
320
Properties
= new PropertyStore();
353 references to Properties
System.Windows.Forms (353)
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 (157)
326
Properties
.AddValue(
461
return
Properties
.GetValueOrDefault(
470
Properties
.AddOrRemoveValue(
482
return
Properties
.GetValueOrDefault(
491
Properties
.AddOrRemoveValue(
536
if (!
Properties
.TryGetValue(s_accessibilityProperty, out AccessibleObject? accessibleObject))
539
Properties
.AddValue(s_accessibilityProperty, accessibleObject);
555
if (!
Properties
.TryGetValue(s_ncAccessibilityProperty, out AccessibleObject? ncAccessibleObject))
558
Properties
.AddValue(s_ncAccessibilityProperty, ncAccessibleObject);
582
get =>
Properties
.GetValueOrDefault<string>(s_accessibleDefaultActionProperty);
583
set =>
Properties
.AddOrRemoveValue(s_accessibleDefaultActionProperty, value);
595
get =>
Properties
.GetValueOrDefault<string>(s_accessibleDescriptionProperty);
596
set =>
Properties
.AddOrRemoveValue(s_accessibleDescriptionProperty, value);
608
get =>
Properties
.GetValueOrDefault<string>(s_accessibleNameProperty);
609
set =>
Properties
.AddOrRemoveValue(s_accessibleNameProperty, value);
620
get =>
Properties
.GetValueOrDefault(s_accessibleRoleProperty, AccessibleRole.Default);
624
Properties
.AddOrRemoveValue(s_accessibleRoleProperty, value, defaultValue: AccessibleRole.Default);
672
if (
Properties
.TryGetValueOrNull(s_ambientPropertiesServiceProperty, out AmbientProperties? ambientProperties))
681
Properties
.AddValue(s_ambientPropertiesServiceProperty, ambientProperties);
758
get =>
Properties
.GetValueOrDefault(s_autoScrollOffsetProperty, Point.Empty);
759
set =>
Properties
.AddOrRemoveValue(s_autoScrollOffsetProperty, value, defaultValue: Point.Empty);
780
if (
Properties
.TryGetValue(s_backBrushProperty, out HBRUSH customBackBrush))
786
if (!
Properties
.ContainsKey(s_backColorProperty))
814
Properties
.AddValue(s_backBrushProperty, backBrush);
851
get =>
Properties
.TryGetValue(s_dataContextProperty, out object? value)
863
if (
Properties
.ContainsKey(s_dataContextProperty) && Equals(ParentInternal?.DataContext, value))
865
Properties
.RemoveValue(s_dataContextProperty);
870
Properties
.AddValue(s_dataContextProperty, value);
876
=>
Properties
.ContainsKey(s_dataContextProperty);
879
=>
Properties
.RemoveValue(s_dataContextProperty);
883
get =>
Properties
.GetValueOrDefault(
907
Properties
.RemoveValue(s_visualStylesModeProperty);
911
Properties
.AddValue(s_visualStylesModeProperty, value);
922
=>
Properties
.TryGetValue(
1089
Properties
.AddOrRemoveValue(s_backColorProperty, value);
1114
get =>
Properties
.GetValueOrDefault<Image>(s_backgroundImageProperty);
1122
Properties
.AddOrRemoveValue(s_backgroundImageProperty, value);
1144
get =>
Properties
.GetValueOrDefault(s_backgroundImageLayoutProperty, ImageLayout.Tile);
1166
Properties
.AddOrRemoveValue(s_backgroundImageLayoutProperty, value, defaultValue: ImageLayout.Tile);
1204
Properties
.GetValueOrDefault<ControlBindingsCollection>(s_bindingsProperty)?.Clear();
1217
if (
Properties
.TryGetValue(s_bindingManagerProperty, out BindingContext? context))
1234
BindingContext? oldContext =
Properties
.AddOrRemoveValue(s_bindingManagerProperty, value);
1385
int cacheTextCounter =
Properties
.GetValueOrDefault<int>(s_cacheTextCountProperty);
1398
int cacheTextCounter =
Properties
.GetValueOrDefault<int>(s_cacheTextCountProperty);
1404
Properties
.AddOrRemoveValue(s_cacheTextFieldProperty, _text);
1415
_text =
Properties
.GetValueOrDefault<string?>(s_cacheTextFieldProperty);
1419
Properties
.AddOrRemoveValue(s_cacheTextCountProperty, cacheTextCounter);
1505
get =>
Properties
.GetValueOrDefault<ContextMenuStrip>(s_contextMenuStripProperty);
1508
ContextMenuStrip? oldValue =
Properties
.AddOrRemoveValue(s_contextMenuStripProperty, value);
1707
internal bool IsAccessibilityObjectCreated =>
Properties
.ContainsKey(s_accessibilityProperty);
1735
if (
Properties
.TryGetValue(s_cursorProperty, out Cursor? cursor))
1748
Cursor? localCursor =
Properties
.GetValueOrDefault<Cursor>(s_cursorProperty);
1752
Properties
.AddOrRemoveValue(s_cursorProperty, value);
1800
if (!
Properties
.TryGetValue(s_bindingsProperty, out ControlBindingsCollection? bindings))
1802
bindings =
Properties
.AddValue(s_bindingsProperty, new ControlBindingsCollection(this));
1933
if (
Properties
.TryGetValue(s_fontHandleWrapperProperty, out FontHandleWrapper? fontHandle))
1936
Properties
.RemoveValue(s_fontHandleWrapperProperty);
2079
Font? previous =
Properties
.GetValueOrDefault<Font>(s_fontProperty);
2088
Properties
.AddOrRemoveValue(s_fontProperty, value);
2113
if (
Properties
.ContainsKey(s_fontHeightProperty))
2115
Properties
.AddValue(s_fontHeightProperty, (value is null) ? -1 : value.Height);
2188
if (!
Properties
.TryGetValue(s_fontHandleWrapperProperty, out FontHandleWrapper? fontHandle))
2190
fontHandle =
Properties
.AddValue(s_fontHandleWrapperProperty, new FontHandleWrapper(font));
2205
if (
Properties
.TryGetValue(s_currentAmbientFontProperty, out Font? currentAmbient) && currentAmbient == ambientFont)
2207
fontHandle =
Properties
.GetValueOrDefault<FontHandleWrapper?>(s_fontHandleWrapperProperty);
2211
Properties
.AddValue(s_currentAmbientFontProperty, ambientFont);
2214
fontHandle ??=
Properties
.AddValue(s_fontHandleWrapperProperty, new FontHandleWrapper(ambientFont));
2228
if (
Properties
.TryGetValue(s_fontHeightProperty, out int fontHeight) && fontHeight != -1)
2235
return
Properties
.AddValue(s_fontHeightProperty, font.Height);
2250
Properties
.AddValue(s_fontHeightProperty, localFontHeight);
2255
set =>
Properties
.AddValue(s_fontHeightProperty, value);
2268
Properties
.TryGetValue(s_foreColorProperty, out Color color);
2298
Properties
.AddOrRemoveValue(s_foreColorProperty, value);
2862
string? name =
Properties
.GetValueOrDefault<string>(s_namePropertyProperty);
2870
set =>
Properties
.AddOrRemoveString(s_namePropertyProperty, value);
2932
internal Color RawBackColor =>
Properties
.GetValueOrDefault<Color>(s_backColorProperty);
2982
get =>
Properties
.GetValueOrDefault<Region>(s_regionProperty);
2996
Region? oldRegion =
Properties
.AddOrRemoveValue(s_regionProperty, region);
3122
if (!
Properties
.TryGetValue(s_rightToLeftProperty, out RightToLeft rightToLeft)
3137
if (
Properties
.ContainsKey(s_rightToLeftProperty) || value != RightToLeft.Inherit)
3139
Properties
.AddValue(s_rightToLeftProperty, value);
3186
if (
Properties
.ContainsKey(s_fontHeightProperty))
3188
Properties
.AddValue(s_fontHeightProperty, (value is null) ? -1 : value.Height);
3210
bool checkFont = !
Properties
.ContainsKey(s_fontProperty);
3211
bool checkBackColor = !
Properties
.ContainsKey(s_backColorProperty);
3212
bool checkForeColor = !
Properties
.ContainsKey(s_foreColorProperty);
3213
bool checkCursor = !
Properties
.ContainsKey(s_cursorProperty);
3240
Properties
.AddValue(s_ambientPropertiesServiceProperty, newAmbients);
3376
get =>
Properties
.GetValueOrDefault<object>(s_userDataProperty);
3377
set =>
Properties
.AddOrRemoveValue(s_userDataProperty, value);
3413
if (control.IsActiveX && control.
Properties
.TryGetValue(s_activeXImplProperty, out ActiveXImpl? activeX))
3655
get =>
Properties
.TryGetValue(s_useCompatibleTextRenderingProperty, out bool value)
3662
Properties
.AddValue(s_useCompatibleTextRenderingProperty, value);
3686
if (!
Properties
.TryGetValue(s_controlVersionInfoProperty, out ControlVersionInfo? info))
3689
Properties
.AddValue(s_controlVersionInfoProperty, info);
4510
if (!
Properties
.ContainsKey(s_bindingManagerProperty) && Created)
4593
int updateCount =
Properties
.GetValueOrDefault(s_updateCountProperty, 0);
4599
Properties
.AddOrRemoveValue(
4846
if (!
Properties
.ContainsKey(s_bindingManagerProperty) && ParentInternal is not null && !controlIsAlreadyCreated)
4989
if (
Properties
.TryGetValue(s_backBrushProperty, out HBRUSH backBrush))
4996
Properties
.RemoveValue(s_backBrushProperty);
5001
if (
Properties
?.TryGetValue(s_contextMenuStripProperty, out ContextMenuStrip? menu) == true)
5027
Properties
?.RemoveValue(s_ncAccessibilityProperty);
5030
Properties
?.GetValueOrDefault<ActiveXImpl>(s_activeXImplProperty)?.Dispose();
5288
int updateCount =
Properties
.GetValueOrDefault(s_updateCountProperty, 0);
5294
Properties
.AddOrRemoveValue(
5576
=>
Properties
.GetValueOrDefault(s_updateCountProperty, 0) > 0;
6493
internal bool IsFontSet() =>
Properties
.ContainsKey(s_fontProperty);
6894
if (
Properties
.TryGetValue(s_backBrushProperty, out HBRUSH backBrush))
6904
Properties
.RemoveValue(s_backBrushProperty);
6966
if (
Properties
.ContainsKey(s_bindingsProperty))
7169
int changeVersion =
Properties
.GetValueOrDefault(s_visualStylesModeChangeVersionProperty, 0) + 1;
7170
Properties
.AddValue(s_visualStylesModeChangeVersionProperty, changeVersion);
7269
if (
Properties
.ContainsKey(s_fontHeightProperty))
7271
Properties
.AddValue(s_fontHeightProperty, -1);
7367
Color backColor =
Properties
.GetValueOrDefault<Color>(s_backColorProperty);
7383
if (!
Properties
.ContainsKey(s_bindingManagerProperty))
7392
if (!
Properties
.ContainsKey(s_cursorProperty))
7401
if (
Properties
.ContainsKey(s_dataContextProperty))
7403
if (Equals(
Properties
.GetValueOrDefault<object>(s_dataContextProperty), Parent?.DataContext))
7406
Properties
.RemoveValue(s_dataContextProperty);
7449
if (
Properties
.ContainsKey(s_visualStylesModeProperty))
7451
if (
Properties
.GetValueOrDefault<VisualStylesMode>(s_visualStylesModeProperty)
7455
Properties
.RemoveValue(s_visualStylesModeProperty);
7530
=> _state.Source.
Properties
.GetValueOrDefault(s_visualStylesModeChangeVersionProperty, 0)
7532
&& Control.
Properties
.GetValueOrDefault(s_visualStylesModeChangeVersionProperty, 0)
7545
control.
Properties
.GetValueOrDefault(s_visualStylesModeChangeVersionProperty, 0),
7722
Color foreColor =
Properties
.GetValueOrDefault<Color>(s_foreColorProperty);
7732
if (!
Properties
.TryGetValue(s_rightToLeftProperty, out RightToLeft rightToLeft) || rightToLeft == RightToLeft.Inherit)
7974
if (
Properties
.TryGetValue(s_accessibilityProperty, out ControlAccessibleObject? clientAccessibleObject))
7981
if (
Properties
.TryGetValue(s_ncAccessibilityProperty, out ControlAccessibleObject? nonClientAccessibleObject))
8043
Properties
.AddOrRemoveValue(s_deviceDpiInternal, (int)PInvoke.GetDpiForWindow(this));
8129
if (
Properties
.TryGetValue(s_accessibilityProperty, out AccessibleObject? accObj)
8137
if (
Properties
.TryGetValue(s_ncAccessibilityProperty, out AccessibleObject? ncAccObj)
8145
if (!RecreatingHandle && GetState(States.OwnCtlBrush) &&
Properties
.TryGetValue(s_backBrushProperty, out HBRUSH backBrush))
8147
Properties
.RemoveValue(s_backBrushProperty);
8747
Properties
.AddOrRemoveValue(s_systemVisualSettingsProperty, e.NewSettings);
8771
int changeVersion =
Properties
.GetValueOrDefault(s_visualStylesModeChangeVersionProperty, 0) + 1;
8772
Properties
.AddValue(s_visualStylesModeChangeVersionProperty, changeVersion);
8804
||
Properties
.GetValueOrDefault<bool>(s_systemVisualSettingsRefreshPendingProperty))
8809
Properties
.AddOrRemoveValue(s_systemVisualSettingsRefreshPendingProperty, true, defaultValue: false);
8815
Properties
.AddOrRemoveValue(s_systemVisualSettingsRefreshPendingProperty, false, defaultValue: false);
8823
SystemVisualSettings? oldSettings =
Properties
.GetValueOrDefault<SystemVisualSettings>(s_systemVisualSettingsProperty);
8839
=>
Properties
.AddOrRemoveValue(
10187
Properties
.RemoveValue(s_accessibilityProperty);
10191
Properties
.TryGetValue(s_accessibilityProperty, out accessibleObject);
11303
Color backColor =
Properties
.GetValueOrDefault<Color>(s_backColorProperty);
11311
internal virtual bool ShouldSerializeCursor() =>
Properties
.ContainsKey(s_cursorProperty);
11323
internal virtual bool ShouldSerializeForeColor() => !
Properties
.GetValueOrDefault<Color>(s_foreColorProperty).IsEmpty;
11329
internal virtual bool ShouldSerializeFont() =>
Properties
.ContainsKey(s_fontProperty);
11336
Properties
.TryGetValue(s_rightToLeftProperty, out RightToLeft rightToLeft)
11522
Properties
.TryGetValue(s_fontProperty, out font);
11534
Properties
.AddOrRemoveValue(s_fontProperty, scaledFont);
11539
if (
Properties
.ContainsKey(s_fontHeightProperty))
11541
Properties
.AddValue(s_fontHeightProperty, scaledFont.Height);
11935
if (!
Properties
.TryGetValue(s_contextMenuStripProperty, out ContextMenuStrip? contextMenuStrip))
13456
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\Control.SuspendMutation.cs (10)
57
=>
Properties
.ContainsKey(s_recursiveInvalidateAfterSuspendPaintingProperty);
60
=>
Properties
.GetValueOrDefault(s_suspendPaintingCountProperty, 0);
63
=>
Properties
.AddValue(s_recursiveInvalidateAfterSuspendPaintingProperty, true);
67
int suspendPaintingCount =
Properties
.GetValueOrDefault(
71
Properties
.AddOrRemoveValue(
81
int suspendPaintingCount =
Properties
.GetValueOrDefault(
90
Properties
.AddOrRemoveValue(
119
if (
Properties
.GetValueOrDefault(s_suspendPaintingCountProperty, 0) != 0
120
|| !
Properties
.ContainsKey(s_recursiveInvalidateAfterSuspendPaintingProperty))
125
Properties
.RemoveValue(s_recursiveInvalidateAfterSuspendPaintingProperty);
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (25)
429
get =>
Properties
.GetValueOrDefault(s_propDrawMode, DrawMode.Normal);
437
Properties
.AddOrRemoveValue(s_propDrawMode, value, defaultValue: DrawMode.Normal);
450
get =>
Properties
.TryGetValue(s_propDropDownWidth, out int dropDownWidth)
458
if (
Properties
.GetValueOrDefault<int>(s_propDropDownWidth) != value)
460
Properties
.AddValue(s_propDropDownWidth, value);
480
get =>
Properties
.TryGetValue(s_propDropDownHeight, out int dropDownHeight)
488
if (
Properties
.GetValueOrDefault<int>(s_propDropDownHeight) != value)
490
Properties
.AddValue(s_propDropDownHeight, value);
632
return
Properties
.TryGetValue(s_propItemHeight, out int itemHeight) ? itemHeight : FontHeight + 2;
647
if (
Properties
.GetValueOrDefault<int>(s_propItemHeight) != value)
649
Properties
.AddValue(s_propItemHeight, value);
681
get =>
Properties
.GetStringOrEmptyString(s_propMatchingText);
682
set =>
Properties
.AddOrRemoveString(s_propMatchingText, value);
732
return
Properties
.GetValueOrDefault<int>(s_propMaxLength);
743
Properties
.AddValue(s_propMaxLength, value);
1121
get =>
Properties
.GetValueOrDefault(s_propStyle, ComboBoxStyle.DropDown);
1141
Properties
.AddOrRemoveValue(s_propStyle, value, defaultValue: ComboBoxStyle.DropDown);
2375
if (
Properties
.TryGetValue(s_propDropDownWidth, out int dropDownWidth))
2380
if (
Properties
.ContainsKey(s_propItemHeight))
3180
Properties
.RemoveValue(s_propDropDownWidth);
3185
Properties
.RemoveValue(s_propItemHeight);
3409
internal bool ShouldSerializeDropDownWidth() =>
Properties
.ContainsKey(s_propDropDownWidth);
3414
internal bool ShouldSerializeItemHeight() =>
Properties
.ContainsKey(s_propItemHeight);
4148
if (!
Properties
.TryGetValue(s_propFlatComboAdapter, out FlatComboAdapter? comboAdapter) || !comboAdapter.IsValid(this))
4151
Properties
.AddValue(s_propFlatComboAdapter, comboAdapter);
System\Windows\Forms\Controls\ComboBox\ComboBox.Modern.cs (1)
44
=>
Properties
.RemoveValue(s_propFlatComboAdapter);
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>());
3167
if (--_updateCounter == 0 &&
Properties
.ContainsKey(s_propDelayedUpdateItems))
4013
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\Controls\TreeView\TreeView.cs (3)
831
get =>
Properties
.GetValueOrDefault(s_nodeLeadingProperty, 0.0f);
847
Properties
.AddOrRemoveValue(s_nodeLeadingProperty, value, defaultValue: 0.0f);
2530
private bool ShouldSerializeNodeLeading() =>
Properties
.ContainsKey(s_nodeLeadingProperty);
System\Windows\Forms\Form.cs (88)
221
get =>
Properties
.GetValueOrDefault<IButtonControl?>(s_propAcceptButton);
224
if (
Properties
.AddOrRemoveValue(s_propAcceptButton, value) != value)
336
get =>
Properties
.GetValueOrDefault<Form>(s_propActiveMdiChild);
337
set =>
Properties
.AddOrRemoveValue(s_propActiveMdiChild, value);
344
get =>
Properties
.GetValueOrDefault<Form>(s_propFormerlyActiveMdiChild);
345
set =>
Properties
.AddOrRemoveValue(s_propFormerlyActiveMdiChild, value);
372
Properties
.RemoveValue(s_propOpacity);
374
if (
Properties
.ContainsKey(s_propTransparencyKey))
376
Properties
.AddValue(s_propTransparencyKey, Color.Empty);
713
get =>
Properties
.GetValueOrDefault<IButtonControl>(s_propCancelButton);
716
Properties
.AddOrRemoveValue(s_propCancelButton, value);
779
if (
Properties
.TryGetValue(s_propDialogOwner, out IWin32Window? dialogOwner))
803
Form? formMdiParent =
Properties
.GetValueOrDefault<Form>(s_propFormMdiParent);
1070
public bool IsMdiChild =>
Properties
.ContainsKey(s_propFormMdiParent);
1076
get =>
Properties
.GetValueOrDefault<bool>(s_propMdiChildFocusable);
1077
set =>
Properties
.AddOrRemoveValue(s_propMdiChildFocusable, value);
1158
get =>
Properties
.GetValueOrDefault<Rectangle>(s_propMaximizedBounds);
1163
Properties
.AddValue(s_propMaximizedBounds, value);
1189
get =>
Properties
.TryGetValue(s_propMaxTrackSize, out Size maximumSize) ? maximumSize : Size.Empty;
1206
Properties
.AddValue(s_propMaxTrackSize, value);
1227
Properties
.AddValue(s_propMinTrackSize, minimumSize);
1260
get =>
Properties
.GetValueOrDefault<MenuStrip>(s_propMainMenuStrip);
1263
Properties
.AddOrRemoveValue(s_propMainMenuStrip, value);
1302
get =>
Properties
.TryGetValue(s_propMinTrackSize, out Size minimumSize) ? minimumSize : DefaultMinimumSize;
1323
Properties
.AddValue(s_propMinTrackSize, value);
1344
Properties
.AddValue(s_propMaxTrackSize, maximumSize);
1452
get =>
Properties
.GetValueOrDefault<Form>(s_propFormMdiParent);
1455
Form? formMdiParent =
Properties
.GetValueOrDefault<Form>(s_propFormMdiParent);
1494
Properties
.AddOrRemoveValue(s_propFormMdiParent, value);
1524
get =>
Properties
.GetValueOrDefault<MdiWindowListStrip>(s_propMdiWindowListStrip);
1525
set =>
Properties
.AddOrRemoveValue(s_propMdiWindowListStrip, value);
1530
get =>
Properties
.GetValueOrDefault<MdiControlStrip>(s_propMdiControlStrip);
1531
set =>
Properties
.AddOrRemoveValue(s_propMdiControlStrip, value);
1569
get =>
Properties
.GetValueOrDefault(s_propOpacity, 1.0d);
1574
Properties
.AddOrRemoveValue(s_propOpacity, value, defaultValue: 1.0d);
1616
public Form[] OwnedForms =>
Properties
.TryGetValue(s_propOwnedForms, out List<Form>? ownedForms) ? ([.. ownedForms]) : ([]);
1644
Properties
.RemoveValue(s_propOwner);
1648
Properties
.AddOrRemoveValue(s_propOwner, value);
1656
internal Form? OwnerInternal =>
Properties
.GetValueOrDefault<Form?>(s_propOwner);
1761
get =>
Properties
.GetValueOrDefault(s_propFormScreenCaptureMode, ScreenCaptureMode.Allow);
1775
Properties
.AddOrRemoveValue(s_propFormScreenCaptureMode, value);
2086
get =>
Properties
.GetValueOrDefault(s_propTransparencyKey, Color.Empty);
2089
Properties
.AddOrRemoveValue(s_propTransparencyKey, value, defaultValue: Color.Empty);
2268
get =>
Properties
.GetValueOrDefault(s_propFormCornerPreference, FormCornerPreference.Default);
2285
Properties
.AddOrRemoveValue(s_propFormCornerPreference, value, defaultValue: FormCornerPreference.Default);
2356
get =>
Properties
.GetValueOrDefault(s_propFormBorderColor, Color.Empty);
2364
Properties
.AddOrRemoveValue(s_propFormBorderColor, value, defaultValue: Color.Empty);
2416
get =>
Properties
.GetValueOrDefault(s_propFormCaptionBackColor, Color.Empty);
2424
Properties
.AddOrRemoveValue(s_propFormCaptionBackColor, value, defaultValue: Color.Empty);
2477
get =>
Properties
.GetValueOrDefault(s_propFormCaptionTextColor, Color.Empty);
2485
Properties
.AddOrRemoveValue(s_propFormCaptionTextColor, value, defaultValue: Color.Empty);
2894
if (!
Properties
.TryGetValue(s_propOwnedForms, out List<Form>? ownedForms))
2897
Properties
.AddValue(s_propOwnedForms, ownedForms);
3161
if (
Properties
.TryGetValue(s_propFormMdiParent, out Form? formMdiParent) && formMdiParent.MdiClient != value)
3163
Properties
.RemoveValue(s_propFormMdiParent);
3348
Form? form =
Properties
.GetValueOrDefault<Form>(s_propFormMdiParent);
3523
Properties
.RemoveValue(s_propAcceptButton);
3524
Properties
.RemoveValue(s_propCancelButton);
3525
Properties
.RemoveValue(s_propDefaultButton);
3526
Properties
.RemoveValue(s_propActiveMdiChild);
3540
if (
Properties
.TryGetValue(s_propOwner, out Form? owner))
3543
Properties
.RemoveValue(s_propOwner);
3546
Properties
.RemoveValue(s_propDialogOwner);
3548
if (
Properties
.TryGetValue(s_propOwnedForms, out List<Form>? ownedForms))
3563
if (
Properties
.TryGetValue(s_propDummyMdiMenu, out HMENU dummyMenu))
3565
Properties
.RemoveValue(s_propDummyMdiMenu);
3712
IWin32Window? dialogOwner =
Properties
.GetValueOrDefault<IWin32Window>(s_propDialogOwner);
4757
if (
Properties
.TryGetValue(s_propDefaultButton, out IButtonControl? button))
4770
if (
Properties
.TryGetValue(s_propCancelButton, out button))
4863
if (
Properties
.TryGetValue(s_propOwnedForms, out List<Form>? ownedForms))
4891
if (
Properties
.TryGetValue(s_propOwnedForms, out List<Form>? ownedForms))
4984
if (
Properties
.TryGetValue(s_propFormBorderColor, out Color? formBorderColor))
4989
if (
Properties
.TryGetValue(s_propFormCaptionBackColor, out Color? formCaptionBackColor))
4994
if (
Properties
.TryGetValue(s_propFormCaptionTextColor, out Color? formCaptionTextColor))
4999
if (
Properties
.TryGetValue(s_propFormCornerPreference, out FormCornerPreference? cornerPreference))
5024
if (
Properties
.TryGetValue(s_propOwnedForms, out List<Form>? ownedForms))
5355
IButtonControl? existing =
Properties
.GetValueOrDefault<IButtonControl>(s_propDefaultButton);
5361
Properties
.AddOrRemoveValue(s_propDefaultButton, button);
5495
Properties
.AddOrRemoveValue(s_propDialogOwner, owner);
5770
Properties
.AddOrRemoveValue(s_propDialogOwner, owner);
5831
Properties
.RemoveValue(s_propDialogOwner);
6132
if (
Properties
.TryGetValue(s_propOwner, out Form? owner))
6208
if (!
Properties
.TryGetValue(s_propDummyMdiMenu, out HMENU dummyMenu) || recreateMenu)
6213
Properties
.AddValue(s_propDummyMdiMenu, dummyMenu);
6752
if (
Properties
.TryGetValue(s_propOwnedForms, out List<Form>? ownedForms))
6821
if (
Properties
.TryGetValue(s_propOwnedForms, out List<Form>? ownedForms))
6955
Debug.Assert(
Properties
.ContainsKey(s_propFormMdiParent), "how is formMdiParent null?");
6958
if (
Properties
.TryGetValue(s_propFormMdiParent, out Form? formMdiParent))
System\Windows\Forms\Form.RevealMode.cs (7)
49
if (!
Properties
.TryGetValue(s_propFormRevealMode, out FormRevealMode value)
65
Properties
.RemoveValue(s_propFormRevealMode);
69
Properties
.AddValue(s_propFormRevealMode, value);
97
private bool ShouldSerializeFormRevealMode() =>
Properties
.ContainsKey(s_propFormRevealMode);
99
private void ResetFormRevealMode() =>
Properties
.RemoveValue(s_propFormRevealMode);
103
get =>
Properties
.GetValueOrDefault(s_propFormAppearanceCloaked, false);
104
set =>
Properties
.AddOrRemoveValue(s_propFormAppearanceCloaked, value, defaultValue: false);
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))