102 references to TryGetValue
System.Windows.Forms (102)
System\Windows\Forms\ActiveX\Control.ActiveXImpl.cs (1)
83
if (!Properties.
TryGetValue
(s_activeXImplProperty, out ActiveXImpl? activeXImpl))
System\Windows\Forms\Control.cs (24)
431
if (!Properties.
TryGetValue
(s_accessibilityProperty, out AccessibleObject? accessibleObject))
450
if (!Properties.
TryGetValue
(s_ncAccessibilityProperty, out AccessibleObject? ncAccessibleObject))
734
get => Properties.
TryGetValue
(s_dataContextProperty, out object? value)
943
if (Properties.
TryGetValue
(s_bindingManagerProperty, out BindingContext? context))
1468
if (Properties.
TryGetValue
(s_cursorProperty, out Cursor? cursor))
1533
if (!Properties.
TryGetValue
(s_bindingsProperty, out ControlBindingsCollection? bindings))
1666
if (Properties.
TryGetValue
(s_fontHandleWrapperProperty, out FontHandleWrapper? fontHandle))
1921
if (!Properties.
TryGetValue
(s_fontHandleWrapperProperty, out FontHandleWrapper? fontHandle))
1938
if (Properties.
TryGetValue
(s_currentAmbientFontProperty, out Font? currentAmbient) && currentAmbient == ambientFont)
1961
if (Properties.
TryGetValue
(s_fontHeightProperty, out int fontHeight) && fontHeight != -1)
2001
Properties.
TryGetValue
(s_foreColorProperty, out Color color);
2855
if (!Properties.
TryGetValue
(s_rightToLeftProperty, out RightToLeft rightToLeft)
3146
if (control.IsActiveX && control.Properties.
TryGetValue
(s_activeXImplProperty, out ActiveXImpl? activeX))
3388
get => Properties.
TryGetValue
(s_useCompatibleTextRenderingProperty, out bool value)
3419
if (!Properties.
TryGetValue
(s_controlVersionInfoProperty, out ControlVersionInfo? info))
7006
if (!Properties.
TryGetValue
(s_rightToLeftProperty, out RightToLeft rightToLeft) || rightToLeft == RightToLeft.Inherit)
7246
if (Properties.
TryGetValue
(s_accessibilityProperty, out ControlAccessibleObject? clientAccessibleObject))
7253
if (Properties.
TryGetValue
(s_ncAccessibilityProperty, out ControlAccessibleObject? nonClientAccessibleObject))
7393
if (Properties.
TryGetValue
(s_accessibilityProperty, out ControlAccessibleObject? accObj))
7400
if (Properties.
TryGetValue
(s_ncAccessibilityProperty, out ControlAccessibleObject? nonClientAccessibleObject))
9324
Properties.
TryGetValue
(s_accessibilityProperty, out accessibleObject);
10466
Properties.
TryGetValue
(s_rightToLeftProperty, out RightToLeft rightToLeft)
10652
Properties.
TryGetValue
(s_fontProperty, out font);
11065
if (!Properties.
TryGetValue
(s_contextMenuStripProperty, out ContextMenuStrip? contextMenuStrip))
System\Windows\Forms\Control.Ime.cs (2)
38
if (!Properties.
TryGetValue
(s_imeModeProperty, out ImeMode cachedImeMode))
501
return Properties.
TryGetValue
(s_imeModeProperty, out ImeMode imeMode) && imeMode != DefaultImeMode;
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (5)
431
get => Properties.
TryGetValue
(s_propDropDownWidth, out int dropDownWidth) ? dropDownWidth : Width;
457
get => Properties.
TryGetValue
(s_propDropDownHeight, out int dropDownHeight) ? dropDownHeight : DefaultDropDownHeight;
584
return Properties.
TryGetValue
(s_propItemHeight, out int itemHeight) ? itemHeight : FontHeight + 2;
2305
if (Properties.
TryGetValue
(s_propDropDownWidth, out int dropDownWidth))
3847
if (!Properties.
TryGetValue
(s_propFlatComboAdapter, out FlatComboAdapter? comboAdapter) || !comboAdapter.IsValid(this))
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (1)
2950
if (!Properties.
TryGetValue
(s_propToolTip, out ToolTip? toolTip))
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (1)
5583
if (Properties.
TryGetValue
(s_propToolTip, out ToolTip? keyboardToolTip))
System\Windows\Forms\Controls\DataGridView\DataGridViewBand.cs (3)
85
if (!Properties.
TryGetValue
(s_propDefaultCellStyle, out DataGridViewCellStyle? style))
120
if (Properties.
TryGetValue
(s_propDefaultHeaderCellType, out Type? type))
228
if (Properties.
TryGetValue
(s_propHeaderCell, out DataGridViewHeaderCell? headerCell))
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (3)
89
if (!Properties.
TryGetValue
(s_propCellAccessibilityObject, out AccessibleObject? result))
622
if (!Properties.
TryGetValue
(s_propCellStyle, out DataGridViewCellStyle? dataGridViewCellStyle))
708
if (!Properties.
TryGetValue
(s_propCellValueType, out Type? cellValueType) && OwningColumn is not null)
System\Windows\Forms\Controls\DataGridView\DataGridViewCellStyle.cs (1)
160
get => Properties.
TryGetValue
(s_propForeColor, out Color color) ? color : Color.Empty;
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (1)
1089
if (!Properties.
TryGetValue
(s_propComboBoxCellItems, out ObjectCollection? items))
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.DataGridViewComboBoxCellAccessibleObject.cs (1)
45
if (Owner.Properties.
TryGetValue
(s_propComboBoxCellEditingComboBox, out DataGridViewComboBoxEditingControl? comboBox)
System\Windows\Forms\Controls\DataGridView\DataGridViewLinkCell.cs (3)
47
if (Properties.
TryGetValue
(s_propLinkCellActiveLinkColor, out Color color))
155
if (Properties.
TryGetValue
(s_propLinkCellLinkColor, out Color color))
292
if (Properties.
TryGetValue
(s_propLinkCellVisitedLinkColor, out Color color))
System\Windows\Forms\Controls\DataGridView\DataGridViewRow.cs (1)
41
if (!Properties.
TryGetValue
(s_propRowAccessibilityObject, out AccessibleObject? result))
System\Windows\Forms\Controls\Labels\Label.cs (2)
487
if (!Properties.
TryGetValue
(s_propImageIndex, out LabelImageIndexer? imageIndexer))
856
if (animate == currentlyAnimating || !Properties.
TryGetValue
(s_propImage, out Image? image))
System\Windows\Forms\Controls\ListView\ListView.cs (2)
2215
if (Properties.
TryGetValue
(s_propDelayedUpdateItems, out List<ListViewItem>? newItems))
4000
if (_updateCounter > 0 && Properties.
TryGetValue
(s_propDelayedUpdateItems, out List<ListViewItem>? itemList))
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (5)
384
if (Properties.
TryGetValue
(s_propBindingContext, out BindingContext? context))
1405
if (!IsDropDown && !IsDisposed && !Properties.
TryGetValue
(s_propToolStripPanelCell, out toolStripPanelCell))
1680
if (!Properties.
TryGetValue
(s_propToolTip, out ToolTip? toolTip))
1895
if (Properties.
TryGetValue
(s_propToolStripPanelCell, out ToolStripPanelCell? toolStripPanelCell))
1905
if (Properties.
TryGetValue
(s_propToolTip, out ToolTip? toolTip))
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (7)
195
if (!Properties.
TryGetValue
(s_accessibilityProperty, out AccessibleObject? accessibleObject))
1647
if (!Properties.
TryGetValue
(s_rightToLeftProperty, out RightToLeft rightToLeft))
2947
if (!Properties.
TryGetValue
(s_rightToLeftProperty, out RightToLeft rightToLeft) || rightToLeft == RightToLeft.Inherit)
2963
if (!Properties.
TryGetValue
(s_rightToLeftProperty, out RightToLeft rightToLeft))
3094
if (Properties.
TryGetValue
(s_accessibilityProperty, out AccessibleObject? accessibleObject))
3362
if (!Properties.
TryGetValue
(s_rightToLeftProperty, out RightToLeft rightToLeft))
3639
internal bool TryGetExplicitlySetFont([NotNullWhen(true)] out Font? local) => Properties.
TryGetValue
(s_fontProperty, out local);
System\Windows\Forms\Controls\ToolStrips\ToolStripPanel.cs (1)
274
if (!Properties.
TryGetValue
(s_propToolStripPanelRowCollection, out ToolStripPanelRowCollection? rowCollection))
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelRow.cs (1)
92
if (!Properties.
TryGetValue
(s_propControlsCollection, out ToolStripPanelRowControlCollection? controlsCollection))
System\Windows\Forms\Form.cs (21)
780
if (Properties.
TryGetValue
(s_propDialogOwner, out IWin32Window? dialogOwner))
1193
get => Properties.
TryGetValue
(s_propMaxTrackSize, out Size maximumSize) ? maximumSize : Size.Empty;
1306
get => Properties.
TryGetValue
(s_propMinTrackSize, out Size minimumSize) ? minimumSize : DefaultMinimumSize;
1620
public Form[] OwnedForms => Properties.
TryGetValue
(s_propOwnedForms, out List<Form>? ownedForms) ? ([.. ownedForms]) : ([]);
2831
if (!Properties.
TryGetValue
(s_propOwnedForms, out List<Form>? ownedForms))
3098
if (Properties.
TryGetValue
(s_propFormMdiParent, out Form? formMdiParent) && formMdiParent.MdiClient != value)
3483
if (Properties.
TryGetValue
(s_propOwner, out Form? owner))
3491
if (Properties.
TryGetValue
(s_propOwnedForms, out List<Form>? ownedForms))
4142
if (Properties.
TryGetValue
(s_propFormBorderColor, out Color? formBorderColor))
4147
if (Properties.
TryGetValue
(s_propFormCaptionBackColor, out Color? formCaptionBackColor))
4152
if (Properties.
TryGetValue
(s_propFormCaptionTextColor, out Color? formCaptionTextColor))
4158
if (Properties.
TryGetValue
(s_propFormCornerPreference, out FormCornerPreference? cornerPreference))
4700
if (Properties.
TryGetValue
(s_propDefaultButton, out IButtonControl? button))
4713
if (Properties.
TryGetValue
(s_propCancelButton, out button))
4806
if (Properties.
TryGetValue
(s_propOwnedForms, out List<Form>? ownedForms))
4834
if (Properties.
TryGetValue
(s_propOwnedForms, out List<Form>? ownedForms))
4934
if (Properties.
TryGetValue
(s_propOwnedForms, out List<Form>? ownedForms))
6017
if (Properties.
TryGetValue
(s_propOwner, out Form? owner))
6630
if (Properties.
TryGetValue
(s_propOwnedForms, out List<Form>? ownedForms))
6699
if (Properties.
TryGetValue
(s_propOwnedForms, out List<Form>? ownedForms))
6836
if (Properties.
TryGetValue
(s_propFormMdiParent, out Form? formMdiParent))
System\Windows\Forms\Layout\CommonProperties.cs (7)
86
if (element.Properties.
TryGetValue
(s_marginProperty, out Padding padding))
99
if (element.Properties.
TryGetValue
(s_maximumSizeProperty, out Size size))
112
if (element.Properties.
TryGetValue
(s_minimumSizeProperty, out Size size))
135
if (element.Properties.
TryGetValue
(s_paddingProperty, out Padding padding))
153
if (element.Properties.
TryGetValue
(s_specifiedBoundsProperty, out Rectangle rectangle)
382
if (element.Properties.
TryGetValue
(s_preferredSizeCacheProperty, out Size size) && (size != LayoutUtils.s_invalidSize))
681
if (element.Properties.
TryGetValue
(s_layoutBoundsProperty, out Size size))
System\Windows\Forms\Layout\Containers\ContainerControl.cs (1)
587
if (!Properties.
TryGetValue
(s_propAxContainer, out AxHost.AxContainer? container))
System\Windows\Forms\Layout\DefaultLayout.cs (3)
1007
if (container.Properties.
TryGetValue
(s_cachedBoundsProperty, out IDictionary? dictionary))
1036
if (!container.Properties.
TryGetValue
(s_cachedBoundsProperty, out IDictionary? dictionary))
1076
if (!container.Properties.
TryGetValue
(s_cachedBoundsProperty, out IDictionary? dictionary))
System\Windows\Forms\Layout\FlowLayout.cs (1)
282
!container.Properties.
TryGetValue
(s_wrapContentsProperty, out bool wrap) || wrap;
System\Windows\Forms\Layout\TableLayout.cs (2)
1353
if (!element.Properties.
TryGetValue
(s_layoutInfoProperty, out LayoutInfo? layoutInfo))
1378
if (!container.Properties.
TryGetValue
(s_containerInfoProperty, out ContainerInfo? containerInfo))
System\Windows\Forms\PropertyStore.cs (2)
98
/// <see cref="
TryGetValue
{T}(int, out T)"/> if <see langword="null"/> values are not allowed.
126
bool found =
TryGetValue
(key, out string? previous);