101 references to ContainsKey
System.Windows.Forms (68)
System\Windows\Forms\Control.cs (22)
755
if (!Properties.
ContainsKey
(s_backColorProperty))
820
if (Properties.
ContainsKey
(s_dataContextProperty) && Equals(ParentInternal?.DataContext, value))
833
=> Properties.
ContainsKey
(s_dataContextProperty);
1514
internal bool IsAccessibilityObjectCreated => Properties.
ContainsKey
(s_accessibilityProperty);
1920
if (Properties.
ContainsKey
(s_fontHeightProperty))
2944
if (Properties.
ContainsKey
(s_rightToLeftProperty) || value != RightToLeft.Inherit)
2993
if (Properties.
ContainsKey
(s_fontHeightProperty))
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);
4280
if (!Properties.
ContainsKey
(s_bindingManagerProperty) && Created)
4617
if (!Properties.
ContainsKey
(s_bindingManagerProperty) && ParentInternal is not null && !controlIsAlreadyCreated)
6253
internal bool IsFontSet() => Properties.
ContainsKey
(s_fontProperty);
6726
if (Properties.
ContainsKey
(s_bindingsProperty))
6879
if (Properties.
ContainsKey
(s_fontHeightProperty))
6993
if (!Properties.
ContainsKey
(s_bindingManagerProperty))
7002
if (!Properties.
ContainsKey
(s_cursorProperty))
7011
if (Properties.
ContainsKey
(s_dataContextProperty))
10569
internal virtual bool ShouldSerializeCursor() => Properties.
ContainsKey
(s_cursorProperty);
10587
internal virtual bool ShouldSerializeFont() => Properties.
ContainsKey
(s_fontProperty);
10797
if (Properties.
ContainsKey
(s_fontHeightProperty))
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (3)
2311
if (Properties.
ContainsKey
(s_propItemHeight))
3320
internal bool ShouldSerializeDropDownWidth() => Properties.
ContainsKey
(s_propDropDownWidth);
3325
internal bool ShouldSerializeItemHeight() => Properties.
ContainsKey
(s_propItemHeight);
System\Windows\Forms\Controls\DataGridView\DataGridViewBand.cs (4)
215
public bool HasDefaultCellStyle => Properties.
ContainsKey
(s_propDefaultCellStyle);
217
internal bool HasDefaultHeaderCellType => Properties.
ContainsKey
(s_propDefaultHeaderCellType);
219
internal bool HasHeaderCell => Properties.
ContainsKey
(s_propHeaderCell);
855
private bool ShouldSerializeDefaultHeaderCellType() => Properties.
ContainsKey
(s_propDefaultHeaderCellType);
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (6)
277
private bool HasErrorText => Properties.
ContainsKey
(s_propCellErrorText);
280
public bool HasStyle => Properties.
ContainsKey
(s_propCellStyle);
282
internal bool HasToolTipText => Properties.
ContainsKey
(s_propCellToolTipText);
284
internal bool HasValue => Properties.
ContainsKey
(s_propCellValue);
286
private protected virtual bool HasValueType => Properties.
ContainsKey
(s_propCellValueType);
383
internal bool IsAccessibilityObjectCreated => Properties.
ContainsKey
(s_propCellAccessibilityObject);
System\Windows\Forms\Controls\DataGridView\DataGridViewCellStyle.cs (8)
221
public bool IsFormatProviderDefault => !Properties.
ContainsKey
(s_propFormatProvider);
519
private bool ShouldSerializeBackColor() => Properties.
ContainsKey
(s_propBackColor);
521
private bool ShouldSerializeFont() => Properties.
ContainsKey
(s_propFont);
523
private bool ShouldSerializeForeColor() => Properties.
ContainsKey
(s_propForeColor);
525
private bool ShouldSerializeFormatProvider() => Properties.
ContainsKey
(s_propFormatProvider);
527
private bool ShouldSerializePadding() => Properties.
ContainsKey
(s_propPadding);
529
private bool ShouldSerializeSelectionBackColor() => Properties.
ContainsKey
(s_propSelectionBackColor);
531
private bool ShouldSerializeSelectionForeColor() => Properties.
ContainsKey
(s_propSelectionForeColor);
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxCell.cs (1)
365
if (value is not null || Properties.
ContainsKey
(s_propTrueValue))
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnHeaderCell.cs (1)
58
internal bool ContainsLocalValue => Properties.
ContainsKey
(s_propCellValue);
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (1)
370
internal bool HasItems => Properties.
ContainsKey
(s_propComboBoxCellItems);
System\Windows\Forms\Controls\DataGridView\DataGridViewHeaderCell.cs (1)
114
private protected override bool HasValueType => Properties.
ContainsKey
(s_propValueType);
System\Windows\Forms\Controls\DataGridView\DataGridViewLinkCell.cs (6)
378
if (Properties.
ContainsKey
(s_propLinkCellActiveLinkColor))
383
if (Properties.
ContainsKey
(s_propLinkCellUseColumnTextForLinkValue))
388
if (Properties.
ContainsKey
(s_propLinkCellLinkBehavior))
393
if (Properties.
ContainsKey
(s_propLinkCellLinkColor))
398
if (Properties.
ContainsKey
(s_propLinkCellTrackVisitedState))
403
if (Properties.
ContainsKey
(s_propLinkCellVisitedLinkColor))
System\Windows\Forms\Controls\DataGridView\DataGridViewRow.cs (2)
199
private bool HasErrorText => Properties.
ContainsKey
(s_propRowErrorText);
242
internal bool IsAccessibilityObjectCreated => Properties.
ContainsKey
(s_propRowAccessibilityObject);
System\Windows\Forms\Controls\Labels\Label.cs (1)
1406
private bool ShouldSerializeImage() => Properties.
ContainsKey
(s_propImage);
System\Windows\Forms\Controls\ListView\ListView.cs (2)
2365
if (_updateCounter++ == 0 && !Properties.
ContainsKey
(s_propDelayedUpdateItems))
3170
if (--_updateCounter == 0 && Properties.
ContainsKey
(s_propDelayedUpdateItems))
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (3)
182
internal bool IsAccessibilityObjectCreated => Properties.
ContainsKey
(s_accessibilityProperty);
1670
if (Properties.
ContainsKey
(s_rightToLeftProperty) || value != RightToLeft.Inherit)
3366
private bool ShouldSerializeTextDirection() => Properties.
ContainsKey
(s_textDirectionProperty);
System\Windows\Forms\Form.cs (3)
372
if (Properties.
ContainsKey
(s_propTransparencyKey))
1071
public bool IsMdiChild => Properties.
ContainsKey
(s_propFormMdiParent);
6924
Debug.Assert(Properties.
ContainsKey
(s_propFormMdiParent), "how is formMdiParent null?");
System\Windows\Forms\Layout\CommonProperties.cs (2)
325
if (element.Properties.
ContainsKey
(s_specifiedBoundsProperty))
707
return element.Properties.
ContainsKey
(s_layoutBoundsProperty);
System\Windows\Forms\Layout\Containers\ContainerControl.cs (1)
838
if (Properties.
ContainsKey
(s_propAxContainer))
System\Windows\Forms\Layout\DefaultLayout.cs (1)
1020
container is not null && container.Properties.
ContainsKey
(s_cachedBoundsProperty);
System.Windows.Forms.Tests (33)
System\Windows\Forms\PropertyStoreTests.cs (32)
39
store.
ContainsKey
(key).Should().BeTrue();
50
store.
ContainsKey
(key).Should().BeTrue();
62
store.
ContainsKey
(key).Should().BeFalse();
71
store.
ContainsKey
(1).Should().BeFalse();
81
store.
ContainsKey
(1).Should().BeFalse();
91
store.
ContainsKey
(1).Should().BeFalse();
102
store.
ContainsKey
(1).Should().BeTrue();
112
store.
ContainsKey
(1).Should().BeTrue();
122
store.
ContainsKey
(1).Should().BeTrue();
131
store.
ContainsKey
(1).Should().BeFalse();
140
store.
ContainsKey
(1).Should().BeFalse();
149
store.
ContainsKey
(1).Should().BeFalse();
210
store.
ContainsKey
(1).Should().BeFalse();
214
store.
ContainsKey
(1).Should().BeFalse();
218
store.
ContainsKey
(1).Should().BeTrue();
226
store.
ContainsKey
(1).Should().BeTrue();
237
store.
ContainsKey
(1).Should().BeFalse();
247
store.
ContainsKey
(1).Should().BeFalse();
257
store.
ContainsKey
(1).Should().BeFalse();
267
store.
ContainsKey
(1).Should().BeFalse();
277
store.
ContainsKey
(1).Should().BeFalse();
287
store.
ContainsKey
(1).Should().BeFalse();
297
store.
ContainsKey
(1).Should().BeFalse();
307
store.
ContainsKey
(1).Should().BeFalse();
317
store.
ContainsKey
(1).Should().BeFalse();
327
store.
ContainsKey
(1).Should().BeFalse();
337
store.
ContainsKey
(1).Should().BeFalse();
347
store.
ContainsKey
(1).Should().BeFalse();
357
store.
ContainsKey
(1).Should().BeFalse();
367
store.
ContainsKey
(1).Should().BeFalse();
377
store.
ContainsKey
(1).Should().BeFalse();
387
store.
ContainsKey
(1).Should().BeFalse();
System\Windows\Forms\ToolStripItemTests.cs (1)
15633
return !Properties.
ContainsKey
(key);