1 write to Properties
System.Windows.Forms (1)
System\Windows\Forms\Control.cs (1)
310Properties = new PropertyStore();
298 references to Properties
System.Windows.Forms (298)
System\Windows\Forms\ActiveX\Control.ActiveXImpl.cs (2)
83if (!Properties.TryGetValue(s_activeXImplProperty, out ActiveXImpl? activeXImpl)) 94activeXImpl = Properties.AddValue(s_activeXImplProperty, new ActiveXImpl(this));
System\Windows\Forms\Control.cs (125)
432if (!Properties.TryGetValue(s_accessibilityProperty, out AccessibleObject? accessibleObject)) 435Properties.AddValue(s_accessibilityProperty, accessibleObject); 451if (!Properties.TryGetValue(s_ncAccessibilityProperty, out AccessibleObject? ncAccessibleObject)) 454Properties.AddValue(s_ncAccessibilityProperty, ncAccessibleObject); 478get => Properties.GetValueOrDefault<string>(s_accessibleDefaultActionProperty); 479set => Properties.AddOrRemoveValue(s_accessibleDefaultActionProperty, value); 491get => Properties.GetValueOrDefault<string>(s_accessibleDescriptionProperty); 492set => Properties.AddOrRemoveValue(s_accessibleDescriptionProperty, value); 504get => Properties.GetValueOrDefault<string>(s_accessibleNameProperty); 505set => Properties.AddOrRemoveValue(s_accessibleNameProperty, value); 516get => Properties.GetValueOrDefault(s_accessibleRoleProperty, AccessibleRole.Default); 520Properties.AddOrRemoveValue(s_accessibleRoleProperty, value, defaultValue: AccessibleRole.Default); 568if (Properties.TryGetValueOrNull(s_ambientPropertiesServiceProperty, out AmbientProperties? ambientProperties)) 577Properties.AddValue(s_ambientPropertiesServiceProperty, ambientProperties); 654get => Properties.GetValueOrDefault(s_autoScrollOffsetProperty, Point.Empty); 655set => Properties.AddOrRemoveValue(s_autoScrollOffsetProperty, value, defaultValue: Point.Empty); 676if (Properties.TryGetValue(s_backBrushProperty, out HBRUSH customBackBrush)) 682if (!Properties.ContainsKey(s_backColorProperty)) 710Properties.AddValue(s_backBrushProperty, backBrush); 735get => Properties.TryGetValue(s_dataContextProperty, out object? value) 747if (Properties.ContainsKey(s_dataContextProperty) && Equals(ParentInternal?.DataContext, value)) 749Properties.RemoveValue(s_dataContextProperty); 754Properties.AddValue(s_dataContextProperty, value); 760=> Properties.ContainsKey(s_dataContextProperty); 763=> Properties.RemoveValue(s_dataContextProperty); 816Properties.AddOrRemoveValue(s_backColorProperty, value); 841get => Properties.GetValueOrDefault<Image>(s_backgroundImageProperty); 849Properties.AddOrRemoveValue(s_backgroundImageProperty, value); 871get => Properties.GetValueOrDefault(s_backgroundImageLayoutProperty, ImageLayout.Tile); 893Properties.AddOrRemoveValue(s_backgroundImageLayoutProperty, value, defaultValue: ImageLayout.Tile); 931Properties.GetValueOrDefault<ControlBindingsCollection>(s_bindingsProperty)?.Clear(); 944if (Properties.TryGetValue(s_bindingManagerProperty, out BindingContext? context)) 961BindingContext? oldContext = Properties.AddOrRemoveValue(s_bindingManagerProperty, value); 1112int cacheTextCounter = Properties.GetValueOrDefault<int>(s_cacheTextCountProperty); 1125int cacheTextCounter = Properties.GetValueOrDefault<int>(s_cacheTextCountProperty); 1131Properties.AddOrRemoveValue(s_cacheTextFieldProperty, _text); 1142_text = Properties.GetValueOrDefault<string?>(s_cacheTextFieldProperty); 1146Properties.AddOrRemoveValue(s_cacheTextCountProperty, cacheTextCounter); 1232get => Properties.GetValueOrDefault<ContextMenuStrip>(s_contextMenuStripProperty); 1235ContextMenuStrip? oldValue = Properties.AddOrRemoveValue(s_contextMenuStripProperty, value); 1441internal bool IsAccessibilityObjectCreated => Properties.ContainsKey(s_accessibilityProperty); 1469if (Properties.TryGetValue(s_cursorProperty, out Cursor? cursor)) 1482Cursor? localCursor = Properties.GetValueOrDefault<Cursor>(s_cursorProperty); 1486Properties.AddOrRemoveValue(s_cursorProperty, value); 1534if (!Properties.TryGetValue(s_bindingsProperty, out ControlBindingsCollection? bindings)) 1536bindings = Properties.AddValue(s_bindingsProperty, new ControlBindingsCollection(this)); 1667if (Properties.TryGetValue(s_fontHandleWrapperProperty, out FontHandleWrapper? fontHandle)) 1670Properties.RemoveValue(s_fontHandleWrapperProperty); 1813Font? previous = Properties.GetValueOrDefault<Font>(s_fontProperty); 1822Properties.AddOrRemoveValue(s_fontProperty, value); 1847if (Properties.ContainsKey(s_fontHeightProperty)) 1849Properties.AddValue(s_fontHeightProperty, (value is null) ? -1 : value.Height); 1922if (!Properties.TryGetValue(s_fontHandleWrapperProperty, out FontHandleWrapper? fontHandle)) 1924fontHandle = Properties.AddValue(s_fontHandleWrapperProperty, new FontHandleWrapper(font)); 1939if (Properties.TryGetValue(s_currentAmbientFontProperty, out Font? currentAmbient) && currentAmbient == ambientFont) 1941fontHandle = Properties.GetValueOrDefault<FontHandleWrapper?>(s_fontHandleWrapperProperty); 1945Properties.AddValue(s_currentAmbientFontProperty, ambientFont); 1948fontHandle ??= Properties.AddValue(s_fontHandleWrapperProperty, new FontHandleWrapper(ambientFont)); 1962if (Properties.TryGetValue(s_fontHeightProperty, out int fontHeight) && fontHeight != -1) 1969return Properties.AddValue(s_fontHeightProperty, font.Height); 1984Properties.AddValue(s_fontHeightProperty, localFontHeight); 1989set => Properties.AddValue(s_fontHeightProperty, value); 2002Properties.TryGetValue(s_foreColorProperty, out Color color); 2032Properties.AddOrRemoveValue(s_foreColorProperty, value); 2596string? name = Properties.GetValueOrDefault<string>(s_namePropertyProperty); 2604set => Properties.AddOrRemoveString(s_namePropertyProperty, value); 2666internal Color RawBackColor => Properties.GetValueOrDefault<Color>(s_backColorProperty); 2716get => Properties.GetValueOrDefault<Region>(s_regionProperty); 2730Region? oldRegion = Properties.AddOrRemoveValue(s_regionProperty, region); 2856if (!Properties.TryGetValue(s_rightToLeftProperty, out RightToLeft rightToLeft) 2871if (Properties.ContainsKey(s_rightToLeftProperty) || value != RightToLeft.Inherit) 2873Properties.AddValue(s_rightToLeftProperty, value); 2920if (Properties.ContainsKey(s_fontHeightProperty)) 2922Properties.AddValue(s_fontHeightProperty, (value is null) ? -1 : value.Height); 2944bool checkFont = !Properties.ContainsKey(s_fontProperty); 2945bool checkBackColor = !Properties.ContainsKey(s_backColorProperty); 2946bool checkForeColor = !Properties.ContainsKey(s_foreColorProperty); 2947bool checkCursor = !Properties.ContainsKey(s_cursorProperty); 2974Properties.AddValue(s_ambientPropertiesServiceProperty, newAmbients); 3110get => Properties.GetValueOrDefault<object>(s_userDataProperty); 3111set => Properties.AddOrRemoveValue(s_userDataProperty, value); 3147if (control.IsActiveX && control.Properties.TryGetValue(s_activeXImplProperty, out ActiveXImpl? activeX)) 3389get => Properties.TryGetValue(s_useCompatibleTextRenderingProperty, out bool value) 3396Properties.AddValue(s_useCompatibleTextRenderingProperty, value); 3420if (!Properties.TryGetValue(s_controlVersionInfoProperty, out ControlVersionInfo? info)) 3423Properties.AddValue(s_controlVersionInfoProperty, info); 4207if (!Properties.ContainsKey(s_bindingManagerProperty) && Created) 4544if (!Properties.ContainsKey(s_bindingManagerProperty) && ParentInternal is not null && !controlIsAlreadyCreated) 4687if (Properties.TryGetValue(s_backBrushProperty, out HBRUSH backBrush)) 4694Properties.RemoveValue(s_backBrushProperty); 4725Properties.RemoveValue(s_ncAccessibilityProperty); 4728Properties.GetValueOrDefault<ActiveXImpl>(s_activeXImplProperty)?.Dispose(); 6180internal bool IsFontSet() => Properties.ContainsKey(s_fontProperty); 6581if (Properties.TryGetValue(s_backBrushProperty, out HBRUSH backBrush)) 6591Properties.RemoveValue(s_backBrushProperty); 6653if (Properties.ContainsKey(s_bindingsProperty)) 6806if (Properties.ContainsKey(s_fontHeightProperty)) 6808Properties.AddValue(s_fontHeightProperty, -1); 6904Color backColor = Properties.GetValueOrDefault<Color>(s_backColorProperty); 6920if (!Properties.ContainsKey(s_bindingManagerProperty)) 6929if (!Properties.ContainsKey(s_cursorProperty)) 6938if (Properties.ContainsKey(s_dataContextProperty)) 6940if (Equals(Properties.GetValueOrDefault<object>(s_dataContextProperty), Parent?.DataContext)) 6943Properties.RemoveValue(s_dataContextProperty); 7037Color foreColor = Properties.GetValueOrDefault<Color>(s_foreColorProperty); 7047if (!Properties.TryGetValue(s_rightToLeftProperty, out RightToLeft rightToLeft) || rightToLeft == RightToLeft.Inherit) 7287if (Properties.TryGetValue(s_accessibilityProperty, out ControlAccessibleObject? clientAccessibleObject)) 7294if (Properties.TryGetValue(s_ncAccessibilityProperty, out ControlAccessibleObject? nonClientAccessibleObject)) 7434if (Properties.TryGetValue(s_accessibilityProperty, out ControlAccessibleObject? accObj)) 7441if (Properties.TryGetValue(s_ncAccessibilityProperty, out ControlAccessibleObject? nonClientAccessibleObject)) 7448if (!RecreatingHandle && GetState(States.OwnCtlBrush) && Properties.TryGetValue(s_backBrushProperty, out HBRUSH backBrush)) 7450Properties.RemoveValue(s_backBrushProperty); 9361Properties.RemoveValue(s_accessibilityProperty); 9365Properties.TryGetValue(s_accessibilityProperty, out accessibleObject); 10466Color backColor = Properties.GetValueOrDefault<Color>(s_backColorProperty); 10474internal virtual bool ShouldSerializeCursor() => Properties.ContainsKey(s_cursorProperty); 10486internal virtual bool ShouldSerializeForeColor() => !Properties.GetValueOrDefault<Color>(s_foreColorProperty).IsEmpty; 10492internal virtual bool ShouldSerializeFont() => Properties.ContainsKey(s_fontProperty); 10499Properties.TryGetValue(s_rightToLeftProperty, out RightToLeft rightToLeft) 10685Properties.TryGetValue(s_fontProperty, out font); 10697Properties.AddOrRemoveValue(s_fontProperty, scaledFont); 10702if (Properties.ContainsKey(s_fontHeightProperty)) 10704Properties.AddValue(s_fontHeightProperty, scaledFont.Height); 11098if (!Properties.TryGetValue(s_contextMenuStripProperty, out ContextMenuStrip? contextMenuStrip)) 12610get { return Properties; }
System\Windows\Forms\Control.Ime.cs (10)
38if (!Properties.TryGetValue(s_imeModeProperty, out ImeMode cachedImeMode)) 63Properties.AddValue(s_imeModeProperty, value); 110int val = Properties.GetValueOrDefault<int>(s_disableImeModeChangedCountProperty); 114set => Properties.AddValue(s_disableImeModeChangedCountProperty, value); 231get => Properties.GetValueOrDefault<int>(s_imeWmCharsToIgnoreProperty); 238Properties.AddValue(s_imeWmCharsToIgnoreProperty, value); 250get => Properties.GetValueOrDefault(s_lastCanEnableImeProperty, true); 251set => Properties.AddOrRemoveValue(s_lastCanEnableImeProperty, value, defaultValue: true); 501return Properties.TryGetValue(s_imeModeProperty, out ImeMode imeMode) && imeMode != DefaultImeMode; 627Properties.AddValue(s_imeWmCharsToIgnoreProperty, ImeCharsToIgnoreEnabled);
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (25)
410get => Properties.GetValueOrDefault(s_propDrawMode, DrawMode.Normal); 418Properties.AddOrRemoveValue(s_propDrawMode, value, defaultValue: DrawMode.Normal); 431get => Properties.TryGetValue(s_propDropDownWidth, out int dropDownWidth) ? dropDownWidth : Width; 436if (Properties.GetValueOrDefault<int>(s_propDropDownWidth) != value) 438Properties.AddValue(s_propDropDownWidth, value); 457get => Properties.TryGetValue(s_propDropDownHeight, out int dropDownHeight) ? dropDownHeight : DefaultDropDownHeight; 462if (Properties.GetValueOrDefault<int>(s_propDropDownHeight) != value) 464Properties.AddValue(s_propDropDownHeight, value); 584return Properties.TryGetValue(s_propItemHeight, out int itemHeight) ? itemHeight : FontHeight + 2; 599if (Properties.GetValueOrDefault<int>(s_propItemHeight) != value) 601Properties.AddValue(s_propItemHeight, value); 633get => Properties.GetStringOrEmptyString(s_propMatchingText); 634set => Properties.AddOrRemoveString(s_propMatchingText, value); 684return Properties.GetValueOrDefault<int>(s_propMaxLength); 695Properties.AddValue(s_propMaxLength, value); 1044get => Properties.GetValueOrDefault(s_propStyle, ComboBoxStyle.DropDown); 1064Properties.AddOrRemoveValue(s_propStyle, value, defaultValue: ComboBoxStyle.DropDown); 2306if (Properties.TryGetValue(s_propDropDownWidth, out int dropDownWidth)) 2311if (Properties.ContainsKey(s_propItemHeight)) 3091Properties.RemoveValue(s_propDropDownWidth); 3096Properties.RemoveValue(s_propItemHeight); 3320internal bool ShouldSerializeDropDownWidth() => Properties.ContainsKey(s_propDropDownWidth); 3325internal bool ShouldSerializeItemHeight() => Properties.ContainsKey(s_propItemHeight); 3848if (!Properties.TryGetValue(s_propFlatComboAdapter, out FlatComboAdapter? comboAdapter) || !comboAdapter.IsValid(this)) 3851Properties.AddValue(s_propFlatComboAdapter, comboAdapter);
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (2)
2950if (!Properties.TryGetValue(s_propToolTip, out ToolTip? toolTip)) 2952toolTip = Properties.AddValue(
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (1)
5583if (Properties.TryGetValue(s_propToolTip, out ToolTip? keyboardToolTip))
System\Windows\Forms\Controls\Labels\Label.cs (17)
372Image? image = Properties.GetValueOrDefault<Image>(s_propImage); 392Properties.AddOrRemoveValue(s_propImage, value); 445Properties.RemoveValue(s_propImage); 475Properties.RemoveValue(s_propImage); 487if (!Properties.TryGetValue(s_propImageIndex, out LabelImageIndexer? imageIndexer)) 495set => Properties.AddOrRemoveValue(s_propImageIndex, value); 507get => Properties.GetValueOrDefault<ImageList>(s_propImageList); 527Properties.RemoveValue(s_propImage); 530Properties.AddOrRemoveValue(s_propImageList, value); 552get => Properties.GetValueOrDefault(s_propImageAlign, ContentAlignment.MiddleCenter); 559Properties.AddOrRemoveValue(s_propImageAlign, value, defaultValue: ContentAlignment.MiddleCenter); 696get => Properties.GetValueOrDefault(s_propTextAlign, ContentAlignment.TopLeft); 703Properties.AddOrRemoveValue(s_propTextAlign, value, defaultValue: ContentAlignment.TopLeft); 856if (animate == currentlyAnimating || !Properties.TryGetValue(s_propImage, out Image? image)) 953Properties.RemoveValue(s_propImageList); 956Properties.RemoveValue(s_propImage); 1406private bool ShouldSerializeImage() => Properties.ContainsKey(s_propImage);
System\Windows\Forms\Controls\ListView\ListView.cs (6)
2219if (Properties.TryGetValue(s_propDelayedUpdateItems, out List<ListViewItem>? newItems)) 2222Properties.RemoveValue(s_propDelayedUpdateItems); 2353if (_updateCounter++ == 0 && !Properties.ContainsKey(s_propDelayedUpdateItems)) 2355Properties.AddValue(s_propDelayedUpdateItems, new List<ListViewItem>()); 3158if (--_updateCounter == 0 && Properties.ContainsKey(s_propDelayedUpdateItems)) 4004if (_updateCounter > 0 && Properties.TryGetValue(s_propDelayedUpdateItems, out List<ListViewItem>? itemList))
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (12)
383if (Properties.TryGetValue(s_propBindingContext, out BindingContext? context)) 399if (Properties.AddOrRemoveValue(s_propBindingContext, value) != value) 1403if (!IsDropDown && !IsDisposed && !Properties.TryGetValue(s_propToolStripPanelCell, out toolStripPanelCell)) 1405toolStripPanelCell = Properties.AddValue(s_propToolStripPanelCell, new ToolStripPanelCell(this)); 1678if (!Properties.TryGetValue(s_propToolTip, out ToolTip? toolTip)) 1680toolTip = Properties.AddValue(s_propToolTip, new ToolTip()); 1694ToolStripTextDirection textDirection = Properties.GetValueOrDefault(s_propTextDirection, ToolStripTextDirection.Horizontal); 1706Properties.AddOrRemoveValue(s_propTextDirection, value, defaultValue: ToolStripTextDirection.Horizontal); 1893if (Properties.TryGetValue(s_propToolStripPanelCell, out ToolStripPanelCell? toolStripPanelCell)) 1896Properties.RemoveValue(s_propToolStripPanelCell); 1903if (Properties.TryGetValue(s_propToolTip, out ToolTip? toolTip)) 1906Properties.RemoveValue(s_propToolTip);
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDown.cs (5)
85Properties.RemoveValue(s_propOpacity); 568get => Properties.GetValueOrDefault(s_propOpacity, 1.0d); 573Properties.AddOrRemoveValue(s_propOpacity, value, 1.0d); 753get => Properties.GetValueOrDefault<Control>(s_propSourceControl); 754set => Properties.AddOrRemoveValue(s_propSourceControl, value);
System\Windows\Forms\Controls\ToolStrips\ToolStripOverflow.cs (1)
72get { return Properties; }
System\Windows\Forms\Controls\ToolStrips\ToolStripPanel.cs (2)
274if (!Properties.TryGetValue(s_propToolStripPanelRowCollection, out ToolStripPanelRowCollection? rowCollection)) 276rowCollection = Properties.AddValue(s_propToolStripPanelRowCollection, CreateToolStripPanelRowCollection());
System\Windows\Forms\Form.cs (86)
222get => Properties.GetValueOrDefault<IButtonControl?>(s_propAcceptButton); 225if (Properties.AddOrRemoveValue(s_propAcceptButton, value) != value) 337get => Properties.GetValueOrDefault<Form>(s_propActiveMdiChild); 338set => Properties.AddOrRemoveValue(s_propActiveMdiChild, value); 345get => Properties.GetValueOrDefault<Form>(s_propFormerlyActiveMdiChild); 346set => Properties.AddOrRemoveValue(s_propFormerlyActiveMdiChild, value); 373Properties.RemoveValue(s_propOpacity); 375if (Properties.ContainsKey(s_propTransparencyKey)) 377Properties.AddValue(s_propTransparencyKey, Color.Empty); 714get => Properties.GetValueOrDefault<IButtonControl>(s_propCancelButton); 717Properties.AddOrRemoveValue(s_propCancelButton, value); 780if (Properties.TryGetValue(s_propDialogOwner, out IWin32Window? dialogOwner)) 804Form? formMdiParent = Properties.GetValueOrDefault<Form>(s_propFormMdiParent); 1074public bool IsMdiChild => Properties.ContainsKey(s_propFormMdiParent); 1080get => Properties.GetValueOrDefault<bool>(s_propMdiChildFocusable); 1081set => Properties.AddOrRemoveValue(s_propMdiChildFocusable, value); 1162get => Properties.GetValueOrDefault<Rectangle>(s_propMaximizedBounds); 1167Properties.AddValue(s_propMaximizedBounds, value); 1193get => Properties.TryGetValue(s_propMaxTrackSize, out Size maximumSize) ? maximumSize : Size.Empty; 1210Properties.AddValue(s_propMaxTrackSize, value); 1231Properties.AddValue(s_propMinTrackSize, minimumSize); 1264get => Properties.GetValueOrDefault<MenuStrip>(s_propMainMenuStrip); 1267Properties.AddOrRemoveValue(s_propMainMenuStrip, value); 1306get => Properties.TryGetValue(s_propMinTrackSize, out Size minimumSize) ? minimumSize : DefaultMinimumSize; 1327Properties.AddValue(s_propMinTrackSize, value); 1348Properties.AddValue(s_propMaxTrackSize, maximumSize); 1456get => Properties.GetValueOrDefault<Form>(s_propFormMdiParent); 1459Form? formMdiParent = Properties.GetValueOrDefault<Form>(s_propFormMdiParent); 1498Properties.AddOrRemoveValue(s_propFormMdiParent, value); 1528get => Properties.GetValueOrDefault<MdiWindowListStrip>(s_propMdiWindowListStrip); 1529set => Properties.AddOrRemoveValue(s_propMdiWindowListStrip, value); 1534get => Properties.GetValueOrDefault<MdiControlStrip>(s_propMdiControlStrip); 1535set => Properties.AddOrRemoveValue(s_propMdiControlStrip, value); 1573get => Properties.GetValueOrDefault(s_propOpacity, 1.0d); 1578Properties.AddOrRemoveValue(s_propOpacity, value, defaultValue: 1.0d); 1620public Form[] OwnedForms => Properties.TryGetValue(s_propOwnedForms, out List<Form>? ownedForms) ? ([.. ownedForms]) : ([]); 1648Properties.RemoveValue(s_propOwner); 1652Properties.AddOrRemoveValue(s_propOwner, value); 1660internal Form? OwnerInternal => Properties.GetValueOrDefault<Form?>(s_propOwner); 2006get => Properties.GetValueOrDefault(s_propTransparencyKey, Color.Empty); 2009Properties.AddOrRemoveValue(s_propTransparencyKey, value, defaultValue: Color.Empty); 2189get => Properties.GetValueOrDefault(s_propFormCornerPreference, FormCornerPreference.Default); 2206Properties.AddOrRemoveValue(s_propFormCornerPreference, value, defaultValue: FormCornerPreference.Default); 2281get => Properties.GetValueOrDefault(s_propFormBorderColor, Color.Empty); 2289Properties.AddOrRemoveValue(s_propFormBorderColor, value, defaultValue: Color.Empty); 2343get => Properties.GetValueOrDefault(s_propFormCaptionBackColor, Color.Empty); 2351Properties.AddOrRemoveValue(s_propFormCaptionBackColor, value, defaultValue: Color.Empty); 2406get => Properties.GetValueOrDefault(s_propFormCaptionTextColor, Color.Empty); 2414Properties.AddOrRemoveValue(s_propFormCaptionTextColor, value, defaultValue: Color.Empty); 2831if (!Properties.TryGetValue(s_propOwnedForms, out List<Form>? ownedForms)) 2834Properties.AddValue(s_propOwnedForms, ownedForms); 3098if (Properties.TryGetValue(s_propFormMdiParent, out Form? formMdiParent) && formMdiParent.MdiClient != value) 3100Properties.RemoveValue(s_propFormMdiParent); 3285Form? form = Properties.GetValueOrDefault<Form>(s_propFormMdiParent); 3460Properties.RemoveValue(s_propAcceptButton); 3461Properties.RemoveValue(s_propCancelButton); 3462Properties.RemoveValue(s_propDefaultButton); 3463Properties.RemoveValue(s_propActiveMdiChild); 3483if (Properties.TryGetValue(s_propOwner, out Form? owner)) 3486Properties.RemoveValue(s_propOwner); 3489Properties.RemoveValue(s_propDialogOwner); 3491if (Properties.TryGetValue(s_propOwnedForms, out List<Form>? ownedForms)) 3509if (Properties.TryGetValue(s_propDummyMdiMenu, out HMENU dummyMenu)) 3511Properties.RemoveValue(s_propDummyMdiMenu); 3658IWin32Window? dialogOwner = Properties.GetValueOrDefault<IWin32Window>(s_propDialogOwner); 4142if (Properties.TryGetValue(s_propFormBorderColor, out Color? formBorderColor)) 4147if (Properties.TryGetValue(s_propFormCaptionBackColor, out Color? formCaptionBackColor)) 4152if (Properties.TryGetValue(s_propFormCaptionTextColor, out Color? formCaptionTextColor)) 4158if (Properties.TryGetValue(s_propFormCornerPreference, out FormCornerPreference? cornerPreference)) 4700if (Properties.TryGetValue(s_propDefaultButton, out IButtonControl? button)) 4713if (Properties.TryGetValue(s_propCancelButton, out button)) 4806if (Properties.TryGetValue(s_propOwnedForms, out List<Form>? ownedForms)) 4834if (Properties.TryGetValue(s_propOwnedForms, out List<Form>? ownedForms)) 4934if (Properties.TryGetValue(s_propOwnedForms, out List<Form>? ownedForms)) 5268IButtonControl? existing = Properties.GetValueOrDefault<IButtonControl>(s_propDefaultButton); 5274Properties.AddOrRemoveValue(s_propDefaultButton, button); 5408Properties.AddOrRemoveValue(s_propDialogOwner, owner); 5656Properties.AddOrRemoveValue(s_propDialogOwner, owner); 5717Properties.RemoveValue(s_propDialogOwner); 6017if (Properties.TryGetValue(s_propOwner, out Form? owner)) 6093if (!Properties.TryGetValue(s_propDummyMdiMenu, out HMENU dummyMenu) || recreateMenu) 6098Properties.AddValue(s_propDummyMdiMenu, dummyMenu); 6630if (Properties.TryGetValue(s_propOwnedForms, out List<Form>? ownedForms)) 6699if (Properties.TryGetValue(s_propOwnedForms, out List<Form>? ownedForms)) 6833Debug.Assert(Properties.ContainsKey(s_propFormMdiParent), "how is formMdiParent null?"); 6836if (Properties.TryGetValue(s_propFormMdiParent, out Form? formMdiParent))
System\Windows\Forms\Layout\Containers\ContainerControl.cs (4)
578private void AxContainerFormCreated() => Properties.GetValueOrDefault<AxHost.AxContainer>(s_propAxContainer)?.FormCreated(); 587if (!Properties.TryGetValue(s_propAxContainer, out AxHost.AxContainer? container)) 589container = Properties.AddValue(s_propAxContainer, new AxHost.AxContainer(this)); 845if (Properties.ContainsKey(s_propAxContainer))