Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / UI / WebControls / MenuItemStyleCollection.cs / 1305376 / MenuItemStyleCollection.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.WebControls { using System; using System.Collections; using System.ComponentModel; using System.Web; public sealed class MenuItemStyleCollection : StateManagedCollection { private static readonly Type[] knownTypes = new Type[] { typeof(MenuItemStyle) }; internal MenuItemStyleCollection() { } protected override void OnInsert(int index, object value) { base.OnInsert(index, value); if (value is MenuItemStyle) { MenuItemStyle style = (MenuItemStyle)value; style.Font.Underline = style.Font.Underline; } else { throw new ArgumentException(SR.GetString(SR.MenuItemStyleCollection_InvalidArgument), "value"); } } public MenuItemStyle this[int i] { get { return (MenuItemStyle)((IList)this)[i]; } set { ((IList)this)[i] = value; } } public int Add(MenuItemStyle style) { return ((IList)this).Add(style); } public bool Contains(MenuItemStyle style) { return ((IList)this).Contains(style); } public void CopyTo(MenuItemStyle[] styleArray, int index) { base.CopyTo(styleArray, index); } public int IndexOf(MenuItemStyle style) { return ((IList)this).IndexOf(style); } public void Insert(int index, MenuItemStyle style) { ((IList)this).Insert(index, style); } protected override object CreateKnownType(int index) { return new MenuItemStyle(); } protected override Type[] GetKnownTypes() { return knownTypes; } public void Remove(MenuItemStyle style) { ((IList)this).Remove(style); } public void RemoveAt(int index) { ((IList)this).RemoveAt(index); } protected override void SetDirtyObject(object o) { if (o is MenuItemStyle) { ((MenuItemStyle)o).SetDirty(); } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- CorrelationManager.cs
- DataGridViewSelectedCellsAccessibleObject.cs
- TemplateContentLoader.cs
- IPHostEntry.cs
- NumberEdit.cs
- ConditionalExpression.cs
- PermissionAttributes.cs
- CallbackCorrelationInitializer.cs
- TemplateControlCodeDomTreeGenerator.cs
- DataControlExtensions.cs
- SoapSchemaMember.cs
- fixedPageContentExtractor.cs
- FreezableCollection.cs
- ProcessHostFactoryHelper.cs
- streamingZipPartStream.cs
- WebPartEditorOkVerb.cs
- EntityChangedParams.cs
- WriteFileContext.cs
- ManipulationInertiaStartingEventArgs.cs
- EntityClassGenerator.cs
- ConditionalAttribute.cs
- sqlinternaltransaction.cs
- BitmapEffectRenderDataResource.cs
- DateBoldEvent.cs
- WindowsTokenRoleProvider.cs
- TextFormatterImp.cs
- processwaithandle.cs
- ToolboxCategory.cs
- Int32CollectionConverter.cs
- SpecialFolderEnumConverter.cs
- GridView.cs
- AssociativeAggregationOperator.cs
- LookupNode.cs
- StoreContentChangedEventArgs.cs
- OperationAbortedException.cs
- PartialCachingAttribute.cs
- HighlightVisual.cs
- Stacktrace.cs
- Margins.cs
- IDictionary.cs
- XAMLParseException.cs
- OSEnvironmentHelper.cs
- ReadOnlyActivityGlyph.cs
- SplitterPanel.cs
- HtmlShim.cs
- SchemaMerger.cs
- Metadata.cs
- BooleanExpr.cs
- ProxyManager.cs
- Encoder.cs
- Pair.cs
- RawUIStateInputReport.cs
- LocalizedNameDescriptionPair.cs
- CompModSwitches.cs
- EasingFunctionBase.cs
- GestureRecognitionResult.cs
- GeneralTransform3DTo2DTo3D.cs
- EventDescriptorCollection.cs
- TreeViewDataItemAutomationPeer.cs
- SqlNamer.cs
- StylusCaptureWithinProperty.cs
- MulticastDelegate.cs
- FeatureAttribute.cs
- XmlSchemaExporter.cs
- SchemaNamespaceManager.cs
- TypeValidationEventArgs.cs
- BidirectionalDictionary.cs
- EntityDataSourceUtil.cs
- CircleHotSpot.cs
- ComponentRenameEvent.cs
- DefaultTraceListener.cs
- StrokeNode.cs
- WebConfigurationHostFileChange.cs
- WaitForChangedResult.cs
- ViewValidator.cs
- NotifyInputEventArgs.cs
- SoapIncludeAttribute.cs
- datacache.cs
- Int16Storage.cs
- StyleCollectionEditor.cs
- ProfileInfo.cs
- RootProfilePropertySettingsCollection.cs
- AddressHeaderCollectionElement.cs
- DesignerImageAdapter.cs
- VariableQuery.cs
- EventLogPermission.cs
- DocumentPageViewAutomationPeer.cs
- DataGridViewCellStyle.cs
- XmlSchemaSimpleTypeList.cs
- ScrollData.cs
- ToolBarOverflowPanel.cs
- CroppedBitmap.cs
- Configuration.cs
- XmlIterators.cs
- UpdateTracker.cs
- CharacterMetricsDictionary.cs
- XmlDataSourceNodeDescriptor.cs
- ObjectSet.cs
- LoginUtil.cs
- ReadOnlyHierarchicalDataSourceView.cs