1 write to Properties
System.Windows.Forms (1)
System\Windows\Forms\Control.cs (1)
315
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)
321
Properties
.AddValue(
456
return
Properties
.GetValueOrDefault(
465
Properties
.AddOrRemoveValue(
477
return
Properties
.GetValueOrDefault(
486
Properties
.AddOrRemoveValue(
505
if (!
Properties
.TryGetValue(s_accessibilityProperty, out AccessibleObject? accessibleObject))
508
Properties
.AddValue(s_accessibilityProperty, accessibleObject);
524
if (!
Properties
.TryGetValue(s_ncAccessibilityProperty, out AccessibleObject? ncAccessibleObject))
527
Properties
.AddValue(s_ncAccessibilityProperty, ncAccessibleObject);
551
get =>
Properties
.GetValueOrDefault<string>(s_accessibleDefaultActionProperty);
552
set =>
Properties
.AddOrRemoveValue(s_accessibleDefaultActionProperty, value);
564
get =>
Properties
.GetValueOrDefault<string>(s_accessibleDescriptionProperty);
565
set =>
Properties
.AddOrRemoveValue(s_accessibleDescriptionProperty, value);
577
get =>
Properties
.GetValueOrDefault<string>(s_accessibleNameProperty);
578
set =>
Properties
.AddOrRemoveValue(s_accessibleNameProperty, value);
589
get =>
Properties
.GetValueOrDefault(s_accessibleRoleProperty, AccessibleRole.Default);
593
Properties
.AddOrRemoveValue(s_accessibleRoleProperty, value, defaultValue: AccessibleRole.Default);
641
if (
Properties
.TryGetValueOrNull(s_ambientPropertiesServiceProperty, out AmbientProperties? ambientProperties))
650
Properties
.AddValue(s_ambientPropertiesServiceProperty, ambientProperties);
727
get =>
Properties
.GetValueOrDefault(s_autoScrollOffsetProperty, Point.Empty);
728
set =>
Properties
.AddOrRemoveValue(s_autoScrollOffsetProperty, value, defaultValue: Point.Empty);
749
if (
Properties
.TryGetValue(s_backBrushProperty, out HBRUSH customBackBrush))
755
if (!
Properties
.ContainsKey(s_backColorProperty))
783
Properties
.AddValue(s_backBrushProperty, backBrush);
808
get =>
Properties
.TryGetValue(s_dataContextProperty, out object? value)
820
if (
Properties
.ContainsKey(s_dataContextProperty) && Equals(ParentInternal?.DataContext, value))
822
Properties
.RemoveValue(s_dataContextProperty);
827
Properties
.AddValue(s_dataContextProperty, value);
833
=>
Properties
.ContainsKey(s_dataContextProperty);
836
=>
Properties
.RemoveValue(s_dataContextProperty);
889
Properties
.AddOrRemoveValue(s_backColorProperty, value);
914
get =>
Properties
.GetValueOrDefault<Image>(s_backgroundImageProperty);
922
Properties
.AddOrRemoveValue(s_backgroundImageProperty, value);
944
get =>
Properties
.GetValueOrDefault(s_backgroundImageLayoutProperty, ImageLayout.Tile);
966
Properties
.AddOrRemoveValue(s_backgroundImageLayoutProperty, value, defaultValue: ImageLayout.Tile);
1004
Properties
.GetValueOrDefault<ControlBindingsCollection>(s_bindingsProperty)?.Clear();
1017
if (
Properties
.TryGetValue(s_bindingManagerProperty, out BindingContext? context))
1034
BindingContext? oldContext =
Properties
.AddOrRemoveValue(s_bindingManagerProperty, value);
1185
int cacheTextCounter =
Properties
.GetValueOrDefault<int>(s_cacheTextCountProperty);
1198
int cacheTextCounter =
Properties
.GetValueOrDefault<int>(s_cacheTextCountProperty);
1204
Properties
.AddOrRemoveValue(s_cacheTextFieldProperty, _text);
1215
_text =
Properties
.GetValueOrDefault<string?>(s_cacheTextFieldProperty);
1219
Properties
.AddOrRemoveValue(s_cacheTextCountProperty, cacheTextCounter);
1305
get =>
Properties
.GetValueOrDefault<ContextMenuStrip>(s_contextMenuStripProperty);
1308
ContextMenuStrip? oldValue =
Properties
.AddOrRemoveValue(s_contextMenuStripProperty, value);
1514
internal bool IsAccessibilityObjectCreated =>
Properties
.ContainsKey(s_accessibilityProperty);
1542
if (
Properties
.TryGetValue(s_cursorProperty, out Cursor? cursor))
1555
Cursor? localCursor =
Properties
.GetValueOrDefault<Cursor>(s_cursorProperty);
1559
Properties
.AddOrRemoveValue(s_cursorProperty, value);
1607
if (!
Properties
.TryGetValue(s_bindingsProperty, out ControlBindingsCollection? bindings))
1609
bindings =
Properties
.AddValue(s_bindingsProperty, new ControlBindingsCollection(this));
1740
if (
Properties
.TryGetValue(s_fontHandleWrapperProperty, out FontHandleWrapper? fontHandle))
1743
Properties
.RemoveValue(s_fontHandleWrapperProperty);
1886
Font? previous =
Properties
.GetValueOrDefault<Font>(s_fontProperty);
1895
Properties
.AddOrRemoveValue(s_fontProperty, value);
1920
if (
Properties
.ContainsKey(s_fontHeightProperty))
1922
Properties
.AddValue(s_fontHeightProperty, (value is null) ? -1 : value.Height);
1995
if (!
Properties
.TryGetValue(s_fontHandleWrapperProperty, out FontHandleWrapper? fontHandle))
1997
fontHandle =
Properties
.AddValue(s_fontHandleWrapperProperty, new FontHandleWrapper(font));
2012
if (
Properties
.TryGetValue(s_currentAmbientFontProperty, out Font? currentAmbient) && currentAmbient == ambientFont)
2014
fontHandle =
Properties
.GetValueOrDefault<FontHandleWrapper?>(s_fontHandleWrapperProperty);
2018
Properties
.AddValue(s_currentAmbientFontProperty, ambientFont);
2021
fontHandle ??=
Properties
.AddValue(s_fontHandleWrapperProperty, new FontHandleWrapper(ambientFont));
2035
if (
Properties
.TryGetValue(s_fontHeightProperty, out int fontHeight) && fontHeight != -1)
2042
return
Properties
.AddValue(s_fontHeightProperty, font.Height);
2057
Properties
.AddValue(s_fontHeightProperty, localFontHeight);
2062
set =>
Properties
.AddValue(s_fontHeightProperty, value);
2075
Properties
.TryGetValue(s_foreColorProperty, out Color color);
2105
Properties
.AddOrRemoveValue(s_foreColorProperty, value);
2669
string? name =
Properties
.GetValueOrDefault<string>(s_namePropertyProperty);
2677
set =>
Properties
.AddOrRemoveString(s_namePropertyProperty, value);
2739
internal Color RawBackColor =>
Properties
.GetValueOrDefault<Color>(s_backColorProperty);
2789
get =>
Properties
.GetValueOrDefault<Region>(s_regionProperty);
2803
Region? oldRegion =
Properties
.AddOrRemoveValue(s_regionProperty, region);
2929
if (!
Properties
.TryGetValue(s_rightToLeftProperty, out RightToLeft rightToLeft)
2944
if (
Properties
.ContainsKey(s_rightToLeftProperty) || value != RightToLeft.Inherit)
2946
Properties
.AddValue(s_rightToLeftProperty, value);
2993
if (
Properties
.ContainsKey(s_fontHeightProperty))
2995
Properties
.AddValue(s_fontHeightProperty, (value is null) ? -1 : value.Height);
3017
bool checkFont = !
Properties
.ContainsKey(s_fontProperty);
3018
bool checkBackColor = !
Properties
.ContainsKey(s_backColorProperty);
3019
bool checkForeColor = !
Properties
.ContainsKey(s_foreColorProperty);
3020
bool checkCursor = !
Properties
.ContainsKey(s_cursorProperty);
3047
Properties
.AddValue(s_ambientPropertiesServiceProperty, newAmbients);
3183
get =>
Properties
.GetValueOrDefault<object>(s_userDataProperty);
3184
set =>
Properties
.AddOrRemoveValue(s_userDataProperty, value);
3220
if (control.IsActiveX && control.
Properties
.TryGetValue(s_activeXImplProperty, out ActiveXImpl? activeX))
3462
get =>
Properties
.TryGetValue(s_useCompatibleTextRenderingProperty, out bool value)
3469
Properties
.AddValue(s_useCompatibleTextRenderingProperty, value);
3493
if (!
Properties
.TryGetValue(s_controlVersionInfoProperty, out ControlVersionInfo? info))
3496
Properties
.AddValue(s_controlVersionInfoProperty, info);
4280
if (!
Properties
.ContainsKey(s_bindingManagerProperty) && Created)
4617
if (!
Properties
.ContainsKey(s_bindingManagerProperty) && ParentInternal is not null && !controlIsAlreadyCreated)
4760
if (
Properties
.TryGetValue(s_backBrushProperty, out HBRUSH backBrush))
4767
Properties
.RemoveValue(s_backBrushProperty);
4798
Properties
.RemoveValue(s_ncAccessibilityProperty);
4801
Properties
.GetValueOrDefault<ActiveXImpl>(s_activeXImplProperty)?.Dispose();
6253
internal bool IsFontSet() =>
Properties
.ContainsKey(s_fontProperty);
6654
if (
Properties
.TryGetValue(s_backBrushProperty, out HBRUSH backBrush))
6664
Properties
.RemoveValue(s_backBrushProperty);
6726
if (
Properties
.ContainsKey(s_bindingsProperty))
6879
if (
Properties
.ContainsKey(s_fontHeightProperty))
6881
Properties
.AddValue(s_fontHeightProperty, -1);
6977
Color backColor =
Properties
.GetValueOrDefault<Color>(s_backColorProperty);
6993
if (!
Properties
.ContainsKey(s_bindingManagerProperty))
7002
if (!
Properties
.ContainsKey(s_cursorProperty))
7011
if (
Properties
.ContainsKey(s_dataContextProperty))
7013
if (Equals(
Properties
.GetValueOrDefault<object>(s_dataContextProperty), Parent?.DataContext))
7016
Properties
.RemoveValue(s_dataContextProperty);
7107
Color foreColor =
Properties
.GetValueOrDefault<Color>(s_foreColorProperty);
7117
if (!
Properties
.TryGetValue(s_rightToLeftProperty, out RightToLeft rightToLeft) || rightToLeft == RightToLeft.Inherit)
7357
if (
Properties
.TryGetValue(s_accessibilityProperty, out ControlAccessibleObject? clientAccessibleObject))
7364
if (
Properties
.TryGetValue(s_ncAccessibilityProperty, out ControlAccessibleObject? nonClientAccessibleObject))
7421
Properties
.AddOrRemoveValue(s_deviceDpiInternal, (int)PInvoke.GetDpiForWindow(this));
7507
if (
Properties
.TryGetValue(s_accessibilityProperty, out ControlAccessibleObject? accObj))
7514
if (
Properties
.TryGetValue(s_ncAccessibilityProperty, out ControlAccessibleObject? nonClientAccessibleObject))
7521
if (!RecreatingHandle && GetState(States.OwnCtlBrush) &&
Properties
.TryGetValue(s_backBrushProperty, out HBRUSH backBrush))
7523
Properties
.RemoveValue(s_backBrushProperty);
9443
Properties
.RemoveValue(s_accessibilityProperty);
9447
Properties
.TryGetValue(s_accessibilityProperty, out accessibleObject);
10561
Color backColor =
Properties
.GetValueOrDefault<Color>(s_backColorProperty);
10569
internal virtual bool ShouldSerializeCursor() =>
Properties
.ContainsKey(s_cursorProperty);
10581
internal virtual bool ShouldSerializeForeColor() => !
Properties
.GetValueOrDefault<Color>(s_foreColorProperty).IsEmpty;
10587
internal virtual bool ShouldSerializeFont() =>
Properties
.ContainsKey(s_fontProperty);
10594
Properties
.TryGetValue(s_rightToLeftProperty, out RightToLeft rightToLeft)
10780
Properties
.TryGetValue(s_fontProperty, out font);
10792
Properties
.AddOrRemoveValue(s_fontProperty, scaledFont);
10797
if (
Properties
.ContainsKey(s_fontHeightProperty))
10799
Properties
.AddValue(s_fontHeightProperty, scaledFont.Height);
11193
if (!
Properties
.TryGetValue(s_contextMenuStripProperty, out ContextMenuStrip? contextMenuStrip))
12702
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)
410
get =>
Properties
.GetValueOrDefault(s_propDrawMode, DrawMode.Normal);
418
Properties
.AddOrRemoveValue(s_propDrawMode, value, defaultValue: DrawMode.Normal);
431
get =>
Properties
.TryGetValue(s_propDropDownWidth, out int dropDownWidth) ? dropDownWidth : Width;
436
if (
Properties
.GetValueOrDefault<int>(s_propDropDownWidth) != value)
438
Properties
.AddValue(s_propDropDownWidth, value);
457
get =>
Properties
.TryGetValue(s_propDropDownHeight, out int dropDownHeight) ? dropDownHeight : DefaultDropDownHeight;
462
if (
Properties
.GetValueOrDefault<int>(s_propDropDownHeight) != value)
464
Properties
.AddValue(s_propDropDownHeight, value);
584
return
Properties
.TryGetValue(s_propItemHeight, out int itemHeight) ? itemHeight : FontHeight + 2;
599
if (
Properties
.GetValueOrDefault<int>(s_propItemHeight) != value)
601
Properties
.AddValue(s_propItemHeight, value);
633
get =>
Properties
.GetStringOrEmptyString(s_propMatchingText);
634
set =>
Properties
.AddOrRemoveString(s_propMatchingText, value);
684
return
Properties
.GetValueOrDefault<int>(s_propMaxLength);
695
Properties
.AddValue(s_propMaxLength, value);
1044
get =>
Properties
.GetValueOrDefault(s_propStyle, ComboBoxStyle.DropDown);
1064
Properties
.AddOrRemoveValue(s_propStyle, value, defaultValue: ComboBoxStyle.DropDown);
2306
if (
Properties
.TryGetValue(s_propDropDownWidth, out int dropDownWidth))
2311
if (
Properties
.ContainsKey(s_propItemHeight))
3091
Properties
.RemoveValue(s_propDropDownWidth);
3096
Properties
.RemoveValue(s_propItemHeight);
3320
internal bool ShouldSerializeDropDownWidth() =>
Properties
.ContainsKey(s_propDropDownWidth);
3325
internal bool ShouldSerializeItemHeight() =>
Properties
.ContainsKey(s_propItemHeight);
3841
if (!
Properties
.TryGetValue(s_propFlatComboAdapter, out FlatComboAdapter? comboAdapter) || !comboAdapter.IsValid(this))
3844
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)
5580
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>());
3170
if (--_updateCounter == 0 &&
Properties
.ContainsKey(s_propDelayedUpdateItems))
4016
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);
1071
public bool IsMdiChild =>
Properties
.ContainsKey(s_propFormMdiParent);
1077
get =>
Properties
.GetValueOrDefault<bool>(s_propMdiChildFocusable);
1078
set =>
Properties
.AddOrRemoveValue(s_propMdiChildFocusable, value);
1159
get =>
Properties
.GetValueOrDefault<Rectangle>(s_propMaximizedBounds);
1164
Properties
.AddValue(s_propMaximizedBounds, value);
1190
get =>
Properties
.TryGetValue(s_propMaxTrackSize, out Size maximumSize) ? maximumSize : Size.Empty;
1207
Properties
.AddValue(s_propMaxTrackSize, value);
1228
Properties
.AddValue(s_propMinTrackSize, minimumSize);
1261
get =>
Properties
.GetValueOrDefault<MenuStrip>(s_propMainMenuStrip);
1264
Properties
.AddOrRemoveValue(s_propMainMenuStrip, value);
1303
get =>
Properties
.TryGetValue(s_propMinTrackSize, out Size minimumSize) ? minimumSize : DefaultMinimumSize;
1324
Properties
.AddValue(s_propMinTrackSize, value);
1345
Properties
.AddValue(s_propMaxTrackSize, maximumSize);
1453
get =>
Properties
.GetValueOrDefault<Form>(s_propFormMdiParent);
1456
Form? formMdiParent =
Properties
.GetValueOrDefault<Form>(s_propFormMdiParent);
1495
Properties
.AddOrRemoveValue(s_propFormMdiParent, value);
1525
get =>
Properties
.GetValueOrDefault<MdiWindowListStrip>(s_propMdiWindowListStrip);
1526
set =>
Properties
.AddOrRemoveValue(s_propMdiWindowListStrip, value);
1531
get =>
Properties
.GetValueOrDefault<MdiControlStrip>(s_propMdiControlStrip);
1532
set =>
Properties
.AddOrRemoveValue(s_propMdiControlStrip, value);
1570
get =>
Properties
.GetValueOrDefault(s_propOpacity, 1.0d);
1575
Properties
.AddOrRemoveValue(s_propOpacity, value, defaultValue: 1.0d);
1617
public Form[] OwnedForms =>
Properties
.TryGetValue(s_propOwnedForms, out List<Form>? ownedForms) ? ([.. ownedForms]) : ([]);
1645
Properties
.RemoveValue(s_propOwner);
1649
Properties
.AddOrRemoveValue(s_propOwner, value);
1657
internal Form? OwnerInternal =>
Properties
.GetValueOrDefault<Form?>(s_propOwner);
1762
get =>
Properties
.GetValueOrDefault(s_propFormScreenCaptureMode, ScreenCaptureMode.Allow);
1776
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);
3558
if (
Properties
.TryGetValue(s_propOwner, out Form? owner))
3561
Properties
.RemoveValue(s_propOwner);
3564
Properties
.RemoveValue(s_propDialogOwner);
3566
if (
Properties
.TryGetValue(s_propOwnedForms, out List<Form>? ownedForms))
3584
if (
Properties
.TryGetValue(s_propDummyMdiMenu, out HMENU dummyMenu))
3586
Properties
.RemoveValue(s_propDummyMdiMenu);
3733
IWin32Window? dialogOwner =
Properties
.GetValueOrDefault<IWin32Window>(s_propDialogOwner);
4759
if (
Properties
.TryGetValue(s_propDefaultButton, out IButtonControl? button))
4772
if (
Properties
.TryGetValue(s_propCancelButton, out button))
4865
if (
Properties
.TryGetValue(s_propOwnedForms, out List<Form>? ownedForms))
4893
if (
Properties
.TryGetValue(s_propOwnedForms, out List<Form>? ownedForms))
4986
if (
Properties
.TryGetValue(s_propFormBorderColor, out Color? formBorderColor))
4991
if (
Properties
.TryGetValue(s_propFormCaptionBackColor, out Color? formCaptionBackColor))
4996
if (
Properties
.TryGetValue(s_propFormCaptionTextColor, out Color? formCaptionTextColor))
5002
if (
Properties
.TryGetValue(s_propFormCornerPreference, out FormCornerPreference? cornerPreference))
5028
if (
Properties
.TryGetValue(s_propOwnedForms, out List<Form>? ownedForms))
5359
IButtonControl? existing =
Properties
.GetValueOrDefault<IButtonControl>(s_propDefaultButton);
5365
Properties
.AddOrRemoveValue(s_propDefaultButton, button);
5499
Properties
.AddOrRemoveValue(s_propDialogOwner, owner);
5747
Properties
.AddOrRemoveValue(s_propDialogOwner, owner);
5808
Properties
.RemoveValue(s_propDialogOwner);
6108
if (
Properties
.TryGetValue(s_propOwner, out Form? owner))
6184
if (!
Properties
.TryGetValue(s_propDummyMdiMenu, out HMENU dummyMenu) || recreateMenu)
6189
Properties
.AddValue(s_propDummyMdiMenu, dummyMenu);
6721
if (
Properties
.TryGetValue(s_propOwnedForms, out List<Form>? ownedForms))
6790
if (
Properties
.TryGetValue(s_propOwnedForms, out List<Form>? ownedForms))
6924
Debug.Assert(
Properties
.ContainsKey(s_propFormMdiParent), "how is formMdiParent null?");
6927
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);