1 write to Properties
System.Windows.Forms (1)
System\Windows\Forms\Control.cs (1)
310
Properties
= new PropertyStore();
312 references to Properties
System.Windows.Forms (306)
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 (131)
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);
1535
internal bool IsAccessibilityObjectCreated =>
Properties
.ContainsKey(s_accessibilityProperty);
1563
if (
Properties
.TryGetValue(s_cursorProperty, out Cursor? cursor))
1576
Cursor? localCursor =
Properties
.GetValueOrDefault<Cursor>(s_cursorProperty);
1580
Properties
.AddOrRemoveValue(s_cursorProperty, value);
1628
if (!
Properties
.TryGetValue(s_bindingsProperty, out ControlBindingsCollection? bindings))
1630
bindings =
Properties
.AddValue(s_bindingsProperty, new ControlBindingsCollection(this));
1761
if (
Properties
.TryGetValue(s_fontHandleWrapperProperty, out FontHandleWrapper? fontHandle))
1764
Properties
.RemoveValue(s_fontHandleWrapperProperty);
1907
Font? previous =
Properties
.GetValueOrDefault<Font>(s_fontProperty);
1916
Properties
.AddOrRemoveValue(s_fontProperty, value);
1941
if (
Properties
.ContainsKey(s_fontHeightProperty))
1943
Properties
.AddValue(s_fontHeightProperty, (value is null) ? -1 : value.Height);
2016
if (!
Properties
.TryGetValue(s_fontHandleWrapperProperty, out FontHandleWrapper? fontHandle))
2018
fontHandle =
Properties
.AddValue(s_fontHandleWrapperProperty, new FontHandleWrapper(font));
2033
if (
Properties
.TryGetValue(s_currentAmbientFontProperty, out Font? currentAmbient) && currentAmbient == ambientFont)
2035
fontHandle =
Properties
.GetValueOrDefault<FontHandleWrapper?>(s_fontHandleWrapperProperty);
2039
Properties
.AddValue(s_currentAmbientFontProperty, ambientFont);
2042
fontHandle ??=
Properties
.AddValue(s_fontHandleWrapperProperty, new FontHandleWrapper(ambientFont));
2056
if (
Properties
.TryGetValue(s_fontHeightProperty, out int fontHeight) && fontHeight != -1)
2063
return
Properties
.AddValue(s_fontHeightProperty, font.Height);
2078
Properties
.AddValue(s_fontHeightProperty, localFontHeight);
2083
set =>
Properties
.AddValue(s_fontHeightProperty, value);
2096
Properties
.TryGetValue(s_foreColorProperty, out Color color);
2126
Properties
.AddOrRemoveValue(s_foreColorProperty, value);
2690
string? name =
Properties
.GetValueOrDefault<string>(s_namePropertyProperty);
2698
set =>
Properties
.AddOrRemoveString(s_namePropertyProperty, value);
2760
internal Color RawBackColor =>
Properties
.GetValueOrDefault<Color>(s_backColorProperty);
2810
get =>
Properties
.GetValueOrDefault<Region>(s_regionProperty);
2824
Region? oldRegion =
Properties
.AddOrRemoveValue(s_regionProperty, region);
2950
if (!
Properties
.TryGetValue(s_rightToLeftProperty, out RightToLeft rightToLeft)
2965
if (
Properties
.ContainsKey(s_rightToLeftProperty) || value != RightToLeft.Inherit)
2967
Properties
.AddValue(s_rightToLeftProperty, value);
3014
if (
Properties
.ContainsKey(s_fontHeightProperty))
3016
Properties
.AddValue(s_fontHeightProperty, (value is null) ? -1 : value.Height);
3038
bool checkFont = !
Properties
.ContainsKey(s_fontProperty);
3039
bool checkBackColor = !
Properties
.ContainsKey(s_backColorProperty);
3040
bool checkForeColor = !
Properties
.ContainsKey(s_foreColorProperty);
3041
bool checkCursor = !
Properties
.ContainsKey(s_cursorProperty);
3068
Properties
.AddValue(s_ambientPropertiesServiceProperty, newAmbients);
3204
get =>
Properties
.GetValueOrDefault<object>(s_userDataProperty);
3205
set =>
Properties
.AddOrRemoveValue(s_userDataProperty, value);
3241
if (control.IsActiveX && control.
Properties
.TryGetValue(s_activeXImplProperty, out ActiveXImpl? activeX))
3483
get =>
Properties
.TryGetValue(s_useCompatibleTextRenderingProperty, out bool value)
3490
Properties
.AddValue(s_useCompatibleTextRenderingProperty, value);
3514
if (!
Properties
.TryGetValue(s_controlVersionInfoProperty, out ControlVersionInfo? info))
3517
Properties
.AddValue(s_controlVersionInfoProperty, info);
4301
if (!
Properties
.ContainsKey(s_bindingManagerProperty) && Created)
4638
if (!
Properties
.ContainsKey(s_bindingManagerProperty) && ParentInternal is not null && !controlIsAlreadyCreated)
4781
if (
Properties
.TryGetValue(s_backBrushProperty, out HBRUSH backBrush))
4788
Properties
.RemoveValue(s_backBrushProperty);
4819
Properties
.RemoveValue(s_ncAccessibilityProperty);
4822
Properties
.GetValueOrDefault<ActiveXImpl>(s_activeXImplProperty)?.Dispose();
6274
internal bool IsFontSet() =>
Properties
.ContainsKey(s_fontProperty);
6675
if (
Properties
.TryGetValue(s_backBrushProperty, out HBRUSH backBrush))
6685
Properties
.RemoveValue(s_backBrushProperty);
6747
if (
Properties
.ContainsKey(s_bindingsProperty))
6900
if (
Properties
.ContainsKey(s_fontHeightProperty))
6902
Properties
.AddValue(s_fontHeightProperty, -1);
6998
Color backColor =
Properties
.GetValueOrDefault<Color>(s_backColorProperty);
7014
if (!
Properties
.ContainsKey(s_bindingManagerProperty))
7023
if (!
Properties
.ContainsKey(s_cursorProperty))
7032
if (
Properties
.ContainsKey(s_dataContextProperty))
7034
if (Equals(
Properties
.GetValueOrDefault<object>(s_dataContextProperty), Parent?.DataContext))
7037
Properties
.RemoveValue(s_dataContextProperty);
7128
Color foreColor =
Properties
.GetValueOrDefault<Color>(s_foreColorProperty);
7138
if (!
Properties
.TryGetValue(s_rightToLeftProperty, out RightToLeft rightToLeft) || rightToLeft == RightToLeft.Inherit)
7378
if (
Properties
.TryGetValue(s_accessibilityProperty, out ControlAccessibleObject? clientAccessibleObject))
7385
if (
Properties
.TryGetValue(s_ncAccessibilityProperty, out ControlAccessibleObject? nonClientAccessibleObject))
7442
Properties
.AddOrRemoveValue(s_deviceDpiInternal, (int)PInvoke.GetDpiForWindow(this));
7528
if (
Properties
.TryGetValue(s_accessibilityProperty, out ControlAccessibleObject? accObj))
7535
if (
Properties
.TryGetValue(s_ncAccessibilityProperty, out ControlAccessibleObject? nonClientAccessibleObject))
7542
if (!RecreatingHandle && GetState(States.OwnCtlBrush) &&
Properties
.TryGetValue(s_backBrushProperty, out HBRUSH backBrush))
7544
Properties
.RemoveValue(s_backBrushProperty);
9464
Properties
.RemoveValue(s_accessibilityProperty);
9468
Properties
.TryGetValue(s_accessibilityProperty, out accessibleObject);
10582
Color backColor =
Properties
.GetValueOrDefault<Color>(s_backColorProperty);
10590
internal virtual bool ShouldSerializeCursor() =>
Properties
.ContainsKey(s_cursorProperty);
10602
internal virtual bool ShouldSerializeForeColor() => !
Properties
.GetValueOrDefault<Color>(s_foreColorProperty).IsEmpty;
10608
internal virtual bool ShouldSerializeFont() =>
Properties
.ContainsKey(s_fontProperty);
10615
Properties
.TryGetValue(s_rightToLeftProperty, out RightToLeft rightToLeft)
10801
Properties
.TryGetValue(s_fontProperty, out font);
10813
Properties
.AddOrRemoveValue(s_fontProperty, scaledFont);
10818
if (
Properties
.ContainsKey(s_fontHeightProperty))
10820
Properties
.AddValue(s_fontHeightProperty, scaledFont.Height);
11214
if (!
Properties
.TryGetValue(s_contextMenuStripProperty, out ContextMenuStrip? contextMenuStrip))
12723
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)
426
get =>
Properties
.GetValueOrDefault(s_propDrawMode, DrawMode.Normal);
434
Properties
.AddOrRemoveValue(s_propDrawMode, value, defaultValue: DrawMode.Normal);
447
get =>
Properties
.TryGetValue(s_propDropDownWidth, out int dropDownWidth) ? dropDownWidth : Width;
452
if (
Properties
.GetValueOrDefault<int>(s_propDropDownWidth) != value)
454
Properties
.AddValue(s_propDropDownWidth, value);
473
get =>
Properties
.TryGetValue(s_propDropDownHeight, out int dropDownHeight) ? dropDownHeight : DefaultDropDownHeight;
478
if (
Properties
.GetValueOrDefault<int>(s_propDropDownHeight) != value)
480
Properties
.AddValue(s_propDropDownHeight, value);
600
return
Properties
.TryGetValue(s_propItemHeight, out int itemHeight) ? itemHeight : FontHeight + 2;
615
if (
Properties
.GetValueOrDefault<int>(s_propItemHeight) != value)
617
Properties
.AddValue(s_propItemHeight, value);
649
get =>
Properties
.GetStringOrEmptyString(s_propMatchingText);
650
set =>
Properties
.AddOrRemoveString(s_propMatchingText, value);
700
return
Properties
.GetValueOrDefault<int>(s_propMaxLength);
711
Properties
.AddValue(s_propMaxLength, value);
1060
get =>
Properties
.GetValueOrDefault(s_propStyle, ComboBoxStyle.DropDown);
1080
Properties
.AddOrRemoveValue(s_propStyle, value, defaultValue: ComboBoxStyle.DropDown);
2319
if (
Properties
.TryGetValue(s_propDropDownWidth, out int dropDownWidth))
2324
if (
Properties
.ContainsKey(s_propItemHeight))
3092
Properties
.RemoveValue(s_propDropDownWidth);
3097
Properties
.RemoveValue(s_propItemHeight);
3321
internal bool ShouldSerializeDropDownWidth() =>
Properties
.ContainsKey(s_propDropDownWidth);
3326
internal bool ShouldSerializeItemHeight() =>
Properties
.ContainsKey(s_propItemHeight);
3909
if (!
Properties
.TryGetValue(s_propFlatComboAdapter, out FlatComboAdapter? comboAdapter) || !comboAdapter.IsValid(this))
3912
Properties
.AddValue(s_propFlatComboAdapter, comboAdapter);
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (2)
2958
if (!
Properties
.TryGetValue(s_propToolTip, out ToolTip? toolTip))
2960
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)
372
Image? image =
Properties
.GetValueOrDefault<Image>(s_propImage);
392
Properties
.AddOrRemoveValue(s_propImage, value);
445
Properties
.RemoveValue(s_propImage);
475
Properties
.RemoveValue(s_propImage);
487
if (!
Properties
.TryGetValue(s_propImageIndex, out LabelImageIndexer? imageIndexer))
495
set =>
Properties
.AddOrRemoveValue(s_propImageIndex, value);
507
get =>
Properties
.GetValueOrDefault<ImageList>(s_propImageList);
527
Properties
.RemoveValue(s_propImage);
530
Properties
.AddOrRemoveValue(s_propImageList, value);
552
get =>
Properties
.GetValueOrDefault(s_propImageAlign, ContentAlignment.MiddleCenter);
559
Properties
.AddOrRemoveValue(s_propImageAlign, value, defaultValue: ContentAlignment.MiddleCenter);
696
get =>
Properties
.GetValueOrDefault(s_propTextAlign, ContentAlignment.TopLeft);
703
Properties
.AddOrRemoveValue(s_propTextAlign, value, defaultValue: ContentAlignment.TopLeft);
856
if (animate == currentlyAnimating || !
Properties
.TryGetValue(s_propImage, out Image? image))
953
Properties
.RemoveValue(s_propImageList);
956
Properties
.RemoveValue(s_propImage);
1406
private bool ShouldSerializeImage() =>
Properties
.ContainsKey(s_propImage);
System\Windows\Forms\Controls\ListView\ListView.cs (6)
2231
if (
Properties
.TryGetValue(s_propDelayedUpdateItems, out List<ListViewItem>? newItems))
2234
Properties
.RemoveValue(s_propDelayedUpdateItems);
2365
if (_updateCounter++ == 0 && !
Properties
.ContainsKey(s_propDelayedUpdateItems))
2367
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)
1402
if (!IsDropDown && !IsDisposed && !
Properties
.TryGetValue(s_propToolStripPanelCell, out toolStripPanelCell))
1404
toolStripPanelCell =
Properties
.AddValue(s_propToolStripPanelCell, new ToolStripPanelCell(this));
1677
if (!
Properties
.TryGetValue(s_propToolTip, out ToolTip? toolTip))
1679
toolTip =
Properties
.AddValue(s_propToolTip, new ToolTip());
1693
ToolStripTextDirection textDirection =
Properties
.GetValueOrDefault(s_propTextDirection, ToolStripTextDirection.Horizontal);
1705
Properties
.AddOrRemoveValue(s_propTextDirection, value, defaultValue: ToolStripTextDirection.Horizontal);
1892
if (
Properties
.TryGetValue(s_propToolStripPanelCell, out ToolStripPanelCell? toolStripPanelCell))
1895
Properties
.RemoveValue(s_propToolStripPanelCell);
1902
if (
Properties
.TryGetValue(s_propToolTip, out ToolTip? toolTip))
1905
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)
219
get =>
Properties
.GetValueOrDefault<IButtonControl?>(s_propAcceptButton);
222
if (
Properties
.AddOrRemoveValue(s_propAcceptButton, value) != value)
334
get =>
Properties
.GetValueOrDefault<Form>(s_propActiveMdiChild);
335
set =>
Properties
.AddOrRemoveValue(s_propActiveMdiChild, value);
342
get =>
Properties
.GetValueOrDefault<Form>(s_propFormerlyActiveMdiChild);
343
set =>
Properties
.AddOrRemoveValue(s_propFormerlyActiveMdiChild, value);
370
Properties
.RemoveValue(s_propOpacity);
372
if (
Properties
.ContainsKey(s_propTransparencyKey))
374
Properties
.AddValue(s_propTransparencyKey, Color.Empty);
711
get =>
Properties
.GetValueOrDefault<IButtonControl>(s_propCancelButton);
714
Properties
.AddOrRemoveValue(s_propCancelButton, value);
777
if (
Properties
.TryGetValue(s_propDialogOwner, out IWin32Window? dialogOwner))
801
Form? formMdiParent =
Properties
.GetValueOrDefault<Form>(s_propFormMdiParent);
1068
public bool IsMdiChild =>
Properties
.ContainsKey(s_propFormMdiParent);
1074
get =>
Properties
.GetValueOrDefault<bool>(s_propMdiChildFocusable);
1075
set =>
Properties
.AddOrRemoveValue(s_propMdiChildFocusable, value);
1156
get =>
Properties
.GetValueOrDefault<Rectangle>(s_propMaximizedBounds);
1161
Properties
.AddValue(s_propMaximizedBounds, value);
1187
get =>
Properties
.TryGetValue(s_propMaxTrackSize, out Size maximumSize) ? maximumSize : Size.Empty;
1204
Properties
.AddValue(s_propMaxTrackSize, value);
1225
Properties
.AddValue(s_propMinTrackSize, minimumSize);
1258
get =>
Properties
.GetValueOrDefault<MenuStrip>(s_propMainMenuStrip);
1261
Properties
.AddOrRemoveValue(s_propMainMenuStrip, value);
1300
get =>
Properties
.TryGetValue(s_propMinTrackSize, out Size minimumSize) ? minimumSize : DefaultMinimumSize;
1321
Properties
.AddValue(s_propMinTrackSize, value);
1342
Properties
.AddValue(s_propMaxTrackSize, maximumSize);
1450
get =>
Properties
.GetValueOrDefault<Form>(s_propFormMdiParent);
1453
Form? formMdiParent =
Properties
.GetValueOrDefault<Form>(s_propFormMdiParent);
1492
Properties
.AddOrRemoveValue(s_propFormMdiParent, value);
1522
get =>
Properties
.GetValueOrDefault<MdiWindowListStrip>(s_propMdiWindowListStrip);
1523
set =>
Properties
.AddOrRemoveValue(s_propMdiWindowListStrip, value);
1528
get =>
Properties
.GetValueOrDefault<MdiControlStrip>(s_propMdiControlStrip);
1529
set =>
Properties
.AddOrRemoveValue(s_propMdiControlStrip, value);
1567
get =>
Properties
.GetValueOrDefault(s_propOpacity, 1.0d);
1572
Properties
.AddOrRemoveValue(s_propOpacity, value, defaultValue: 1.0d);
1614
public Form[] OwnedForms =>
Properties
.TryGetValue(s_propOwnedForms, out List<Form>? ownedForms) ? ([.. ownedForms]) : ([]);
1642
Properties
.RemoveValue(s_propOwner);
1646
Properties
.AddOrRemoveValue(s_propOwner, value);
1654
internal Form? OwnerInternal =>
Properties
.GetValueOrDefault<Form?>(s_propOwner);
1759
get =>
Properties
.GetValueOrDefault(s_propFormScreenCaptureMode, ScreenCaptureMode.Allow);
1773
Properties
.AddOrRemoveValue(s_propFormScreenCaptureMode, value);
2084
get =>
Properties
.GetValueOrDefault(s_propTransparencyKey, Color.Empty);
2087
Properties
.AddOrRemoveValue(s_propTransparencyKey, value, defaultValue: Color.Empty);
2267
get =>
Properties
.GetValueOrDefault(s_propFormCornerPreference, FormCornerPreference.Default);
2284
Properties
.AddOrRemoveValue(s_propFormCornerPreference, value, defaultValue: FormCornerPreference.Default);
2359
get =>
Properties
.GetValueOrDefault(s_propFormBorderColor, Color.Empty);
2367
Properties
.AddOrRemoveValue(s_propFormBorderColor, value, defaultValue: Color.Empty);
2421
get =>
Properties
.GetValueOrDefault(s_propFormCaptionBackColor, Color.Empty);
2429
Properties
.AddOrRemoveValue(s_propFormCaptionBackColor, value, defaultValue: Color.Empty);
2484
get =>
Properties
.GetValueOrDefault(s_propFormCaptionTextColor, Color.Empty);
2492
Properties
.AddOrRemoveValue(s_propFormCaptionTextColor, value, defaultValue: Color.Empty);
2906
if (!
Properties
.TryGetValue(s_propOwnedForms, out List<Form>? ownedForms))
2909
Properties
.AddValue(s_propOwnedForms, ownedForms);
3173
if (
Properties
.TryGetValue(s_propFormMdiParent, out Form? formMdiParent) && formMdiParent.MdiClient != value)
3175
Properties
.RemoveValue(s_propFormMdiParent);
3360
Form? form =
Properties
.GetValueOrDefault<Form>(s_propFormMdiParent);
3535
Properties
.RemoveValue(s_propAcceptButton);
3536
Properties
.RemoveValue(s_propCancelButton);
3537
Properties
.RemoveValue(s_propDefaultButton);
3538
Properties
.RemoveValue(s_propActiveMdiChild);
3552
if (
Properties
.TryGetValue(s_propOwner, out Form? owner))
3555
Properties
.RemoveValue(s_propOwner);
3558
Properties
.RemoveValue(s_propDialogOwner);
3560
if (
Properties
.TryGetValue(s_propOwnedForms, out List<Form>? ownedForms))
3575
if (
Properties
.TryGetValue(s_propDummyMdiMenu, out HMENU dummyMenu))
3577
Properties
.RemoveValue(s_propDummyMdiMenu);
3724
IWin32Window? dialogOwner =
Properties
.GetValueOrDefault<IWin32Window>(s_propDialogOwner);
4756
if (
Properties
.TryGetValue(s_propDefaultButton, out IButtonControl? button))
4769
if (
Properties
.TryGetValue(s_propCancelButton, out button))
4862
if (
Properties
.TryGetValue(s_propOwnedForms, out List<Form>? ownedForms))
4890
if (
Properties
.TryGetValue(s_propOwnedForms, out List<Form>? ownedForms))
4983
if (
Properties
.TryGetValue(s_propFormBorderColor, out Color? formBorderColor))
4988
if (
Properties
.TryGetValue(s_propFormCaptionBackColor, out Color? formCaptionBackColor))
4993
if (
Properties
.TryGetValue(s_propFormCaptionTextColor, out Color? formCaptionTextColor))
4999
if (
Properties
.TryGetValue(s_propFormCornerPreference, out FormCornerPreference? cornerPreference))
5025
if (
Properties
.TryGetValue(s_propOwnedForms, out List<Form>? ownedForms))
5356
IButtonControl? existing =
Properties
.GetValueOrDefault<IButtonControl>(s_propDefaultButton);
5362
Properties
.AddOrRemoveValue(s_propDefaultButton, button);
5496
Properties
.AddOrRemoveValue(s_propDialogOwner, owner);
5744
Properties
.AddOrRemoveValue(s_propDialogOwner, owner);
5805
Properties
.RemoveValue(s_propDialogOwner);
6105
if (
Properties
.TryGetValue(s_propOwner, out Form? owner))
6181
if (!
Properties
.TryGetValue(s_propDummyMdiMenu, out HMENU dummyMenu) || recreateMenu)
6186
Properties
.AddValue(s_propDummyMdiMenu, dummyMenu);
6726
if (
Properties
.TryGetValue(s_propOwnedForms, out List<Form>? ownedForms))
6795
if (
Properties
.TryGetValue(s_propOwnedForms, out List<Form>? ownedForms))
6929
Debug.Assert(
Properties
.ContainsKey(s_propFormMdiParent), "how is formMdiParent null?");
6932
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);