Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / Designer / WinForms / System / WinForms / Design / ContextMenuStripGroupCollection.cs / 1 / ContextMenuStripGroupCollection.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
/*
*/
namespace System.Windows.Forms.Design {
using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
internal class ContextMenuStripGroupCollection : DictionaryBase {
public ContextMenuStripGroupCollection() {
}
public ContextMenuStripGroup this[string key] {
get {
if (!this.InnerHashtable.ContainsKey(key)) {
this.InnerHashtable[key] = new ContextMenuStripGroup(key);
}
return this.InnerHashtable[key] as ContextMenuStripGroup;
}
}
public bool ContainsKey(string key) {
return InnerHashtable.ContainsKey(key);
}
protected override void OnInsert(object key, object value) {
if (!(value is ContextMenuStripGroup)) {
throw new NotSupportedException();
}
base.OnInsert(key, value);
}
protected override void OnSet(object key, object oldValue, object newValue) {
if (!(newValue is ContextMenuStripGroup)) {
throw new NotSupportedException();
}
base.OnSet(key, oldValue, newValue);
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- AsyncPostBackErrorEventArgs.cs
- HtmlValidatorAdapter.cs
- exports.cs
- DashStyle.cs
- DataGridColumn.cs
- PathFigure.cs
- Panel.cs
- ImageSource.cs
- XamlFxTrace.cs
- NonClientArea.cs
- SimpleMailWebEventProvider.cs
- wmiprovider.cs
- TextDecoration.cs
- QueryOperationResponseOfT.cs
- InputLanguageManager.cs
- XmlChoiceIdentifierAttribute.cs
- TypeDependencyAttribute.cs
- InputManager.cs
- _DomainName.cs
- Exceptions.cs
- AddInControllerImpl.cs
- StsCommunicationException.cs
- RecordsAffectedEventArgs.cs
- DeflateEmulationStream.cs
- IndicFontClient.cs
- UserCancellationException.cs
- ProgressBarRenderer.cs
- oledbmetadatacollectionnames.cs
- View.cs
- ContextQuery.cs
- QueuePropertyVariants.cs
- DeploymentExceptionMapper.cs
- NavigationProperty.cs
- KeyedHashAlgorithm.cs
- EventNotify.cs
- AppDomainCompilerProxy.cs
- Storyboard.cs
- RequestTimeoutManager.cs
- ProviderUtil.cs
- Assembly.cs
- Membership.cs
- _BufferOffsetSize.cs
- WindowsFont.cs
- EntryPointNotFoundException.cs
- MgmtConfigurationRecord.cs
- LocationReference.cs
- ActivityExecutor.cs
- MasterPageParser.cs
- ActivityCodeDomSerializationManager.cs
- ReaderWriterLockWrapper.cs
- UserControlParser.cs
- CodeNamespaceImport.cs
- TableLayoutSettingsTypeConverter.cs
- Boolean.cs
- PriorityChain.cs
- ArraySet.cs
- ImmutableObjectAttribute.cs
- XmlSchemaObjectTable.cs
- RealProxy.cs
- QueryOperatorEnumerator.cs
- StreamBodyWriter.cs
- Rectangle.cs
- Pen.cs
- RootBrowserWindowAutomationPeer.cs
- Site.cs
- MaterialGroup.cs
- _AutoWebProxyScriptHelper.cs
- GcHandle.cs
- InternalDuplexChannelListener.cs
- TraceHandler.cs
- DnsEndPoint.cs
- DBPropSet.cs
- MULTI_QI.cs
- WindowsFormsLinkLabel.cs
- DesignerView.Commands.cs
- EntityDataSourceReferenceGroup.cs
- ParseNumbers.cs
- LineServicesCallbacks.cs
- RC2.cs
- SafePointer.cs
- OuterGlowBitmapEffect.cs
- FormViewInsertedEventArgs.cs
- FamilyMap.cs
- OleDbInfoMessageEvent.cs
- SqlCacheDependencySection.cs
- InnerItemCollectionView.cs
- SkewTransform.cs
- ValidatingCollection.cs
- DataGridView.cs
- SessionSwitchEventArgs.cs
- WorkflowDesignerMessageFilter.cs
- MetadataCache.cs
- XmlNotation.cs
- Page.cs
- ContentPresenter.cs
- CookieHandler.cs
- CreateParams.cs
- GiveFeedbackEvent.cs
- FlowDocumentPaginator.cs
- printdlgexmarshaler.cs