1 write to Properties
System.Windows.Forms (1)
System\Windows\Forms\Control.cs (1)
310Properties = new PropertyStore();
312 references to Properties
System.Windows.Forms (306)
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 (131)
316Properties.AddValue( 451return Properties.GetValueOrDefault( 460Properties.AddOrRemoveValue( 472return Properties.GetValueOrDefault( 481Properties.AddOrRemoveValue( 526if (!Properties.TryGetValue(s_accessibilityProperty, out AccessibleObject? accessibleObject)) 529Properties.AddValue(s_accessibilityProperty, accessibleObject); 545if (!Properties.TryGetValue(s_ncAccessibilityProperty, out AccessibleObject? ncAccessibleObject)) 548Properties.AddValue(s_ncAccessibilityProperty, ncAccessibleObject); 572get => Properties.GetValueOrDefault<string>(s_accessibleDefaultActionProperty); 573set => Properties.AddOrRemoveValue(s_accessibleDefaultActionProperty, value); 585get => Properties.GetValueOrDefault<string>(s_accessibleDescriptionProperty); 586set => Properties.AddOrRemoveValue(s_accessibleDescriptionProperty, value); 598get => Properties.GetValueOrDefault<string>(s_accessibleNameProperty); 599set => Properties.AddOrRemoveValue(s_accessibleNameProperty, value); 610get => Properties.GetValueOrDefault(s_accessibleRoleProperty, AccessibleRole.Default); 614Properties.AddOrRemoveValue(s_accessibleRoleProperty, value, defaultValue: AccessibleRole.Default); 662if (Properties.TryGetValueOrNull(s_ambientPropertiesServiceProperty, out AmbientProperties? ambientProperties)) 671Properties.AddValue(s_ambientPropertiesServiceProperty, ambientProperties); 748get => Properties.GetValueOrDefault(s_autoScrollOffsetProperty, Point.Empty); 749set => Properties.AddOrRemoveValue(s_autoScrollOffsetProperty, value, defaultValue: Point.Empty); 770if (Properties.TryGetValue(s_backBrushProperty, out HBRUSH customBackBrush)) 776if (!Properties.ContainsKey(s_backColorProperty)) 804Properties.AddValue(s_backBrushProperty, backBrush); 829get => Properties.TryGetValue(s_dataContextProperty, out object? value) 841if (Properties.ContainsKey(s_dataContextProperty) && Equals(ParentInternal?.DataContext, value)) 843Properties.RemoveValue(s_dataContextProperty); 848Properties.AddValue(s_dataContextProperty, value); 854=> Properties.ContainsKey(s_dataContextProperty); 857=> Properties.RemoveValue(s_dataContextProperty); 910Properties.AddOrRemoveValue(s_backColorProperty, value); 935get => Properties.GetValueOrDefault<Image>(s_backgroundImageProperty); 943Properties.AddOrRemoveValue(s_backgroundImageProperty, value); 965get => Properties.GetValueOrDefault(s_backgroundImageLayoutProperty, ImageLayout.Tile); 987Properties.AddOrRemoveValue(s_backgroundImageLayoutProperty, value, defaultValue: ImageLayout.Tile); 1025Properties.GetValueOrDefault<ControlBindingsCollection>(s_bindingsProperty)?.Clear(); 1038if (Properties.TryGetValue(s_bindingManagerProperty, out BindingContext? context)) 1055BindingContext? oldContext = Properties.AddOrRemoveValue(s_bindingManagerProperty, value); 1206int cacheTextCounter = Properties.GetValueOrDefault<int>(s_cacheTextCountProperty); 1219int cacheTextCounter = Properties.GetValueOrDefault<int>(s_cacheTextCountProperty); 1225Properties.AddOrRemoveValue(s_cacheTextFieldProperty, _text); 1236_text = Properties.GetValueOrDefault<string?>(s_cacheTextFieldProperty); 1240Properties.AddOrRemoveValue(s_cacheTextCountProperty, cacheTextCounter); 1326get => Properties.GetValueOrDefault<ContextMenuStrip>(s_contextMenuStripProperty); 1329ContextMenuStrip? oldValue = Properties.AddOrRemoveValue(s_contextMenuStripProperty, value); 1535internal bool IsAccessibilityObjectCreated => Properties.ContainsKey(s_accessibilityProperty); 1563if (Properties.TryGetValue(s_cursorProperty, out Cursor? cursor)) 1576Cursor? localCursor = Properties.GetValueOrDefault<Cursor>(s_cursorProperty); 1580Properties.AddOrRemoveValue(s_cursorProperty, value); 1628if (!Properties.TryGetValue(s_bindingsProperty, out ControlBindingsCollection? bindings)) 1630bindings = Properties.AddValue(s_bindingsProperty, new ControlBindingsCollection(this)); 1761if (Properties.TryGetValue(s_fontHandleWrapperProperty, out FontHandleWrapper? fontHandle)) 1764Properties.RemoveValue(s_fontHandleWrapperProperty); 1907Font? previous = Properties.GetValueOrDefault<Font>(s_fontProperty); 1916Properties.AddOrRemoveValue(s_fontProperty, value); 1941if (Properties.ContainsKey(s_fontHeightProperty)) 1943Properties.AddValue(s_fontHeightProperty, (value is null) ? -1 : value.Height); 2016if (!Properties.TryGetValue(s_fontHandleWrapperProperty, out FontHandleWrapper? fontHandle)) 2018fontHandle = Properties.AddValue(s_fontHandleWrapperProperty, new FontHandleWrapper(font)); 2033if (Properties.TryGetValue(s_currentAmbientFontProperty, out Font? currentAmbient) && currentAmbient == ambientFont) 2035fontHandle = Properties.GetValueOrDefault<FontHandleWrapper?>(s_fontHandleWrapperProperty); 2039Properties.AddValue(s_currentAmbientFontProperty, ambientFont); 2042fontHandle ??= Properties.AddValue(s_fontHandleWrapperProperty, new FontHandleWrapper(ambientFont)); 2056if (Properties.TryGetValue(s_fontHeightProperty, out int fontHeight) && fontHeight != -1) 2063return Properties.AddValue(s_fontHeightProperty, font.Height); 2078Properties.AddValue(s_fontHeightProperty, localFontHeight); 2083set => Properties.AddValue(s_fontHeightProperty, value); 2096Properties.TryGetValue(s_foreColorProperty, out Color color); 2126Properties.AddOrRemoveValue(s_foreColorProperty, value); 2690string? name = Properties.GetValueOrDefault<string>(s_namePropertyProperty); 2698set => Properties.AddOrRemoveString(s_namePropertyProperty, value); 2760internal Color RawBackColor => Properties.GetValueOrDefault<Color>(s_backColorProperty); 2810get => Properties.GetValueOrDefault<Region>(s_regionProperty); 2824Region? oldRegion = Properties.AddOrRemoveValue(s_regionProperty, region); 2950if (!Properties.TryGetValue(s_rightToLeftProperty, out RightToLeft rightToLeft) 2965if (Properties.ContainsKey(s_rightToLeftProperty) || value != RightToLeft.Inherit) 2967Properties.AddValue(s_rightToLeftProperty, value); 3014if (Properties.ContainsKey(s_fontHeightProperty)) 3016Properties.AddValue(s_fontHeightProperty, (value is null) ? -1 : value.Height); 3038bool checkFont = !Properties.ContainsKey(s_fontProperty); 3039bool checkBackColor = !Properties.ContainsKey(s_backColorProperty); 3040bool checkForeColor = !Properties.ContainsKey(s_foreColorProperty); 3041bool checkCursor = !Properties.ContainsKey(s_cursorProperty); 3068Properties.AddValue(s_ambientPropertiesServiceProperty, newAmbients); 3204get => Properties.GetValueOrDefault<object>(s_userDataProperty); 3205set => Properties.AddOrRemoveValue(s_userDataProperty, value); 3241if (control.IsActiveX && control.Properties.TryGetValue(s_activeXImplProperty, out ActiveXImpl? activeX)) 3483get => Properties.TryGetValue(s_useCompatibleTextRenderingProperty, out bool value) 3490Properties.AddValue(s_useCompatibleTextRenderingProperty, value); 3514if (!Properties.TryGetValue(s_controlVersionInfoProperty, out ControlVersionInfo? info)) 3517Properties.AddValue(s_controlVersionInfoProperty, info); 4301if (!Properties.ContainsKey(s_bindingManagerProperty) && Created) 4638if (!Properties.ContainsKey(s_bindingManagerProperty) && ParentInternal is not null && !controlIsAlreadyCreated) 4781if (Properties.TryGetValue(s_backBrushProperty, out HBRUSH backBrush)) 4788Properties.RemoveValue(s_backBrushProperty); 4819Properties.RemoveValue(s_ncAccessibilityProperty); 4822Properties.GetValueOrDefault<ActiveXImpl>(s_activeXImplProperty)?.Dispose(); 6274internal bool IsFontSet() => Properties.ContainsKey(s_fontProperty); 6675if (Properties.TryGetValue(s_backBrushProperty, out HBRUSH backBrush)) 6685Properties.RemoveValue(s_backBrushProperty); 6747if (Properties.ContainsKey(s_bindingsProperty)) 6900if (Properties.ContainsKey(s_fontHeightProperty)) 6902Properties.AddValue(s_fontHeightProperty, -1); 6998Color backColor = Properties.GetValueOrDefault<Color>(s_backColorProperty); 7014if (!Properties.ContainsKey(s_bindingManagerProperty)) 7023if (!Properties.ContainsKey(s_cursorProperty)) 7032if (Properties.ContainsKey(s_dataContextProperty)) 7034if (Equals(Properties.GetValueOrDefault<object>(s_dataContextProperty), Parent?.DataContext)) 7037Properties.RemoveValue(s_dataContextProperty); 7128Color foreColor = Properties.GetValueOrDefault<Color>(s_foreColorProperty); 7138if (!Properties.TryGetValue(s_rightToLeftProperty, out RightToLeft rightToLeft) || rightToLeft == RightToLeft.Inherit) 7378if (Properties.TryGetValue(s_accessibilityProperty, out ControlAccessibleObject? clientAccessibleObject)) 7385if (Properties.TryGetValue(s_ncAccessibilityProperty, out ControlAccessibleObject? nonClientAccessibleObject)) 7440Properties.AddOrRemoveValue(s_deviceDpiInternal, (int)PInvoke.GetDpiForWindow(this)); 7526if (Properties.TryGetValue(s_accessibilityProperty, out ControlAccessibleObject? accObj)) 7533if (Properties.TryGetValue(s_ncAccessibilityProperty, out ControlAccessibleObject? nonClientAccessibleObject)) 7540if (!RecreatingHandle && GetState(States.OwnCtlBrush) && Properties.TryGetValue(s_backBrushProperty, out HBRUSH backBrush)) 7542Properties.RemoveValue(s_backBrushProperty); 9461Properties.RemoveValue(s_accessibilityProperty); 9465Properties.TryGetValue(s_accessibilityProperty, out accessibleObject); 10577Color backColor = Properties.GetValueOrDefault<Color>(s_backColorProperty); 10585internal virtual bool ShouldSerializeCursor() => Properties.ContainsKey(s_cursorProperty); 10597internal virtual bool ShouldSerializeForeColor() => !Properties.GetValueOrDefault<Color>(s_foreColorProperty).IsEmpty; 10603internal virtual bool ShouldSerializeFont() => Properties.ContainsKey(s_fontProperty); 10610Properties.TryGetValue(s_rightToLeftProperty, out RightToLeft rightToLeft) 10796Properties.TryGetValue(s_fontProperty, out font); 10808Properties.AddOrRemoveValue(s_fontProperty, scaledFont); 10813if (Properties.ContainsKey(s_fontHeightProperty)) 10815Properties.AddValue(s_fontHeightProperty, scaledFont.Height); 11209if (!Properties.TryGetValue(s_contextMenuStripProperty, out ContextMenuStrip? contextMenuStrip)) 12718get { 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)
424get => Properties.GetValueOrDefault(s_propDrawMode, DrawMode.Normal); 432Properties.AddOrRemoveValue(s_propDrawMode, value, defaultValue: DrawMode.Normal); 445get => Properties.TryGetValue(s_propDropDownWidth, out int dropDownWidth) ? dropDownWidth : Width; 450if (Properties.GetValueOrDefault<int>(s_propDropDownWidth) != value) 452Properties.AddValue(s_propDropDownWidth, value); 471get => Properties.TryGetValue(s_propDropDownHeight, out int dropDownHeight) ? dropDownHeight : DefaultDropDownHeight; 476if (Properties.GetValueOrDefault<int>(s_propDropDownHeight) != value) 478Properties.AddValue(s_propDropDownHeight, value); 598return Properties.TryGetValue(s_propItemHeight, out int itemHeight) ? itemHeight : FontHeight + 2; 613if (Properties.GetValueOrDefault<int>(s_propItemHeight) != value) 615Properties.AddValue(s_propItemHeight, value); 647get => Properties.GetStringOrEmptyString(s_propMatchingText); 648set => Properties.AddOrRemoveString(s_propMatchingText, value); 698return Properties.GetValueOrDefault<int>(s_propMaxLength); 709Properties.AddValue(s_propMaxLength, value); 1058get => Properties.GetValueOrDefault(s_propStyle, ComboBoxStyle.DropDown); 1078Properties.AddOrRemoveValue(s_propStyle, value, defaultValue: ComboBoxStyle.DropDown); 2317if (Properties.TryGetValue(s_propDropDownWidth, out int dropDownWidth)) 2322if (Properties.ContainsKey(s_propItemHeight)) 3088Properties.RemoveValue(s_propDropDownWidth); 3093Properties.RemoveValue(s_propItemHeight); 3317internal bool ShouldSerializeDropDownWidth() => Properties.ContainsKey(s_propDropDownWidth); 3322internal bool ShouldSerializeItemHeight() => Properties.ContainsKey(s_propItemHeight); 3901if (!Properties.TryGetValue(s_propFlatComboAdapter, out FlatComboAdapter? comboAdapter) || !comboAdapter.IsValid(this)) 3904Properties.AddValue(s_propFlatComboAdapter, comboAdapter);
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (2)
2957if (!Properties.TryGetValue(s_propToolTip, out ToolTip? toolTip)) 2959toolTip = Properties.AddValue(
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (1)
5577if (Properties.TryGetValue(s_propToolTip, out ToolTip? keyboardToolTip))
System\Windows\Forms\Controls\Labels\Label.cs (17)
370Image? image = Properties.GetValueOrDefault<Image>(s_propImage); 390Properties.AddOrRemoveValue(s_propImage, value); 443Properties.RemoveValue(s_propImage); 473Properties.RemoveValue(s_propImage); 485if (!Properties.TryGetValue(s_propImageIndex, out LabelImageIndexer? imageIndexer)) 493set => Properties.AddOrRemoveValue(s_propImageIndex, value); 505get => Properties.GetValueOrDefault<ImageList>(s_propImageList); 525Properties.RemoveValue(s_propImage); 528Properties.AddOrRemoveValue(s_propImageList, value); 550get => Properties.GetValueOrDefault(s_propImageAlign, ContentAlignment.MiddleCenter); 557Properties.AddOrRemoveValue(s_propImageAlign, value, defaultValue: ContentAlignment.MiddleCenter); 694get => Properties.GetValueOrDefault(s_propTextAlign, ContentAlignment.TopLeft); 701Properties.AddOrRemoveValue(s_propTextAlign, value, defaultValue: ContentAlignment.TopLeft); 854if (animate == currentlyAnimating || !Properties.TryGetValue(s_propImage, out Image? image)) 951Properties.RemoveValue(s_propImageList); 954Properties.RemoveValue(s_propImage); 1404private bool ShouldSerializeImage() => Properties.ContainsKey(s_propImage);
System\Windows\Forms\Controls\ListView\ListView.cs (6)
2229if (Properties.TryGetValue(s_propDelayedUpdateItems, out List<ListViewItem>? newItems)) 2232Properties.RemoveValue(s_propDelayedUpdateItems); 2363if (_updateCounter++ == 0 && !Properties.ContainsKey(s_propDelayedUpdateItems)) 2365Properties.AddValue(s_propDelayedUpdateItems, new List<ListViewItem>()); 3165if (--_updateCounter == 0 && Properties.ContainsKey(s_propDelayedUpdateItems)) 4011if (_updateCounter > 0 && Properties.TryGetValue(s_propDelayedUpdateItems, out List<ListViewItem>? itemList))
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (12)
382if (Properties.TryGetValue(s_propBindingContext, out BindingContext? context)) 398if (Properties.AddOrRemoveValue(s_propBindingContext, value) != value) 1402if (!IsDropDown && !IsDisposed && !Properties.TryGetValue(s_propToolStripPanelCell, out toolStripPanelCell)) 1404toolStripPanelCell = Properties.AddValue(s_propToolStripPanelCell, new ToolStripPanelCell(this)); 1677if (!Properties.TryGetValue(s_propToolTip, out ToolTip? toolTip)) 1679toolTip = Properties.AddValue(s_propToolTip, new ToolTip()); 1693ToolStripTextDirection textDirection = Properties.GetValueOrDefault(s_propTextDirection, ToolStripTextDirection.Horizontal); 1705Properties.AddOrRemoveValue(s_propTextDirection, value, defaultValue: ToolStripTextDirection.Horizontal); 1892if (Properties.TryGetValue(s_propToolStripPanelCell, out ToolStripPanelCell? toolStripPanelCell)) 1895Properties.RemoveValue(s_propToolStripPanelCell); 1902if (Properties.TryGetValue(s_propToolTip, out ToolTip? toolTip)) 1905Properties.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 (88)
218get => Properties.GetValueOrDefault<IButtonControl?>(s_propAcceptButton); 221if (Properties.AddOrRemoveValue(s_propAcceptButton, value) != value) 333get => Properties.GetValueOrDefault<Form>(s_propActiveMdiChild); 334set => Properties.AddOrRemoveValue(s_propActiveMdiChild, value); 341get => Properties.GetValueOrDefault<Form>(s_propFormerlyActiveMdiChild); 342set => Properties.AddOrRemoveValue(s_propFormerlyActiveMdiChild, value); 369Properties.RemoveValue(s_propOpacity); 371if (Properties.ContainsKey(s_propTransparencyKey)) 373Properties.AddValue(s_propTransparencyKey, Color.Empty); 710get => Properties.GetValueOrDefault<IButtonControl>(s_propCancelButton); 713Properties.AddOrRemoveValue(s_propCancelButton, value); 776if (Properties.TryGetValue(s_propDialogOwner, out IWin32Window? dialogOwner)) 800Form? formMdiParent = Properties.GetValueOrDefault<Form>(s_propFormMdiParent); 1067public bool IsMdiChild => Properties.ContainsKey(s_propFormMdiParent); 1073get => Properties.GetValueOrDefault<bool>(s_propMdiChildFocusable); 1074set => Properties.AddOrRemoveValue(s_propMdiChildFocusable, value); 1155get => Properties.GetValueOrDefault<Rectangle>(s_propMaximizedBounds); 1160Properties.AddValue(s_propMaximizedBounds, value); 1186get => Properties.TryGetValue(s_propMaxTrackSize, out Size maximumSize) ? maximumSize : Size.Empty; 1203Properties.AddValue(s_propMaxTrackSize, value); 1224Properties.AddValue(s_propMinTrackSize, minimumSize); 1257get => Properties.GetValueOrDefault<MenuStrip>(s_propMainMenuStrip); 1260Properties.AddOrRemoveValue(s_propMainMenuStrip, value); 1299get => Properties.TryGetValue(s_propMinTrackSize, out Size minimumSize) ? minimumSize : DefaultMinimumSize; 1320Properties.AddValue(s_propMinTrackSize, value); 1341Properties.AddValue(s_propMaxTrackSize, maximumSize); 1449get => Properties.GetValueOrDefault<Form>(s_propFormMdiParent); 1452Form? formMdiParent = Properties.GetValueOrDefault<Form>(s_propFormMdiParent); 1491Properties.AddOrRemoveValue(s_propFormMdiParent, value); 1521get => Properties.GetValueOrDefault<MdiWindowListStrip>(s_propMdiWindowListStrip); 1522set => Properties.AddOrRemoveValue(s_propMdiWindowListStrip, value); 1527get => Properties.GetValueOrDefault<MdiControlStrip>(s_propMdiControlStrip); 1528set => Properties.AddOrRemoveValue(s_propMdiControlStrip, value); 1566get => Properties.GetValueOrDefault(s_propOpacity, 1.0d); 1571Properties.AddOrRemoveValue(s_propOpacity, value, defaultValue: 1.0d); 1613public Form[] OwnedForms => Properties.TryGetValue(s_propOwnedForms, out List<Form>? ownedForms) ? ([.. ownedForms]) : ([]); 1641Properties.RemoveValue(s_propOwner); 1645Properties.AddOrRemoveValue(s_propOwner, value); 1653internal Form? OwnerInternal => Properties.GetValueOrDefault<Form?>(s_propOwner); 1758get => Properties.GetValueOrDefault(s_propFormScreenCaptureMode, ScreenCaptureMode.Allow); 1772Properties.AddOrRemoveValue(s_propFormScreenCaptureMode, value); 2083get => Properties.GetValueOrDefault(s_propTransparencyKey, Color.Empty); 2086Properties.AddOrRemoveValue(s_propTransparencyKey, value, defaultValue: Color.Empty); 2265get => Properties.GetValueOrDefault(s_propFormCornerPreference, FormCornerPreference.Default); 2282Properties.AddOrRemoveValue(s_propFormCornerPreference, value, defaultValue: FormCornerPreference.Default); 2353get => Properties.GetValueOrDefault(s_propFormBorderColor, Color.Empty); 2361Properties.AddOrRemoveValue(s_propFormBorderColor, value, defaultValue: Color.Empty); 2413get => Properties.GetValueOrDefault(s_propFormCaptionBackColor, Color.Empty); 2421Properties.AddOrRemoveValue(s_propFormCaptionBackColor, value, defaultValue: Color.Empty); 2474get => Properties.GetValueOrDefault(s_propFormCaptionTextColor, Color.Empty); 2482Properties.AddOrRemoveValue(s_propFormCaptionTextColor, value, defaultValue: Color.Empty); 2891if (!Properties.TryGetValue(s_propOwnedForms, out List<Form>? ownedForms)) 2894Properties.AddValue(s_propOwnedForms, ownedForms); 3158if (Properties.TryGetValue(s_propFormMdiParent, out Form? formMdiParent) && formMdiParent.MdiClient != value) 3160Properties.RemoveValue(s_propFormMdiParent); 3345Form? form = Properties.GetValueOrDefault<Form>(s_propFormMdiParent); 3520Properties.RemoveValue(s_propAcceptButton); 3521Properties.RemoveValue(s_propCancelButton); 3522Properties.RemoveValue(s_propDefaultButton); 3523Properties.RemoveValue(s_propActiveMdiChild); 3537if (Properties.TryGetValue(s_propOwner, out Form? owner)) 3540Properties.RemoveValue(s_propOwner); 3543Properties.RemoveValue(s_propDialogOwner); 3545if (Properties.TryGetValue(s_propOwnedForms, out List<Form>? ownedForms)) 3560if (Properties.TryGetValue(s_propDummyMdiMenu, out HMENU dummyMenu)) 3562Properties.RemoveValue(s_propDummyMdiMenu); 3709IWin32Window? dialogOwner = Properties.GetValueOrDefault<IWin32Window>(s_propDialogOwner); 4741if (Properties.TryGetValue(s_propDefaultButton, out IButtonControl? button)) 4754if (Properties.TryGetValue(s_propCancelButton, out button)) 4847if (Properties.TryGetValue(s_propOwnedForms, out List<Form>? ownedForms)) 4875if (Properties.TryGetValue(s_propOwnedForms, out List<Form>? ownedForms)) 4968if (Properties.TryGetValue(s_propFormBorderColor, out Color? formBorderColor)) 4973if (Properties.TryGetValue(s_propFormCaptionBackColor, out Color? formCaptionBackColor)) 4978if (Properties.TryGetValue(s_propFormCaptionTextColor, out Color? formCaptionTextColor)) 4983if (Properties.TryGetValue(s_propFormCornerPreference, out FormCornerPreference? cornerPreference)) 5008if (Properties.TryGetValue(s_propOwnedForms, out List<Form>? ownedForms)) 5339IButtonControl? existing = Properties.GetValueOrDefault<IButtonControl>(s_propDefaultButton); 5345Properties.AddOrRemoveValue(s_propDefaultButton, button); 5479Properties.AddOrRemoveValue(s_propDialogOwner, owner); 5754Properties.AddOrRemoveValue(s_propDialogOwner, owner); 5815Properties.RemoveValue(s_propDialogOwner); 6116if (Properties.TryGetValue(s_propOwner, out Form? owner)) 6192if (!Properties.TryGetValue(s_propDummyMdiMenu, out HMENU dummyMenu) || recreateMenu) 6197Properties.AddValue(s_propDummyMdiMenu, dummyMenu); 6737if (Properties.TryGetValue(s_propOwnedForms, out List<Form>? ownedForms)) 6806if (Properties.TryGetValue(s_propOwnedForms, out List<Form>? ownedForms)) 6940Debug.Assert(Properties.ContainsKey(s_propFormMdiParent), "how is formMdiParent null?"); 6943if (Properties.TryGetValue(s_propFormMdiParent, out Form? formMdiParent))
System\Windows\Forms\Layout\Containers\ContainerControl.cs (4)
571private void AxContainerFormCreated() => Properties.GetValueOrDefault<AxHost.AxContainer>(s_propAxContainer)?.FormCreated(); 580if (!Properties.TryGetValue(s_propAxContainer, out AxHost.AxContainer? container)) 582container = Properties.AddValue(s_propAxContainer, new AxHost.AxContainer(this)); 838if (Properties.ContainsKey(s_propAxContainer))
System.Windows.Forms.Tests (6)
System\Windows\Forms\ListViewTests.cs (5)
5156listView.Properties.AddValue(accessibilityProperty, accessibleObject); 5181listView.Properties.AddValue(accessibilityProperty, accessibleObject); 5206listView.Properties.AddValue(accessibilityProperty, accessibleObject); 5233listView.Properties.AddValue(accessibilityProperty, accessibleObject); 5407listView.Properties.AddValue(accessibilityProperty, accessibleObject);
System\Windows\Forms\PropertyGridInternal\AccessibleObjects\PropertyDescriptorGridEntry.PropertyDescriptorGridEntryAccessibleObjectTests.cs (1)
21propertyGridView.Properties.AddValue(propertyGrid.TestAccessor().Dynamic.s_accessibilityProperty, accessibleObject);