Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / ndp / fx / src / xsp / System / Web / UI / WebControls / MenuItemStyleCollection.cs / 1 / 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; using System.Security.Permissions; [AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] 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. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.WebControls { using System; using System.Collections; using System.ComponentModel; using System.Web; using System.Security.Permissions; [AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] 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
- _SingleItemRequestCache.cs
- FixedSOMContainer.cs
- HashAlgorithm.cs
- DataGridViewCellContextMenuStripNeededEventArgs.cs
- DesignerActionGlyph.cs
- ExpressionsCollectionConverter.cs
- DescendantOverDescendantQuery.cs
- DataGridItem.cs
- MetabaseServerConfig.cs
- ObjectListCommandsPage.cs
- CommonXSendMessage.cs
- SelectionPatternIdentifiers.cs
- WSFederationHttpSecurityMode.cs
- ExtendedPropertyCollection.cs
- RegistrationServices.cs
- SecurityManager.cs
- CurrentChangingEventManager.cs
- Pointer.cs
- WebPartCloseVerb.cs
- CodeComment.cs
- InitializationEventAttribute.cs
- COM2ExtendedBrowsingHandler.cs
- ParseHttpDate.cs
- SchemaTypeEmitter.cs
- Query.cs
- OleServicesContext.cs
- BamlBinaryWriter.cs
- FileDataSourceCache.cs
- WmpBitmapEncoder.cs
- safelink.cs
- ChannelParameterCollection.cs
- DataTableClearEvent.cs
- sqlinternaltransaction.cs
- DiffuseMaterial.cs
- RootBrowserWindow.cs
- OleDbError.cs
- XmlEncoding.cs
- FontFamilyValueSerializer.cs
- Literal.cs
- AssertSection.cs
- Cursors.cs
- DataSource.cs
- Icon.cs
- Menu.cs
- InputScopeAttribute.cs
- SvcMapFile.cs
- FreezableCollection.cs
- TemplateParser.cs
- BufferModeSettings.cs
- WpfSharedBamlSchemaContext.cs
- GeneralTransformGroup.cs
- SpellerHighlightLayer.cs
- WebBrowsableAttribute.cs
- AspNetSynchronizationContext.cs
- SchemaMapping.cs
- BamlLocalizerErrorNotifyEventArgs.cs
- ListenerAdaptersInstallComponent.cs
- IOException.cs
- VirtualPathProvider.cs
- XmlSerializerAssemblyAttribute.cs
- BindingBase.cs
- StatusCommandUI.cs
- XmlEntity.cs
- PackageProperties.cs
- DataRecordObjectView.cs
- TypeGenericEnumerableViewSchema.cs
- BitmapEffect.cs
- NTAccount.cs
- AtomServiceDocumentSerializer.cs
- UnsafeNativeMethodsCLR.cs
- _CommandStream.cs
- TrustSection.cs
- OleDbStruct.cs
- WebResourceAttribute.cs
- LinearGradientBrush.cs
- GPPOINTF.cs
- ToolboxComponentsCreatingEventArgs.cs
- TypeDependencyAttribute.cs
- ObjectQueryExecutionPlan.cs
- Inflater.cs
- GetPageNumberCompletedEventArgs.cs
- OAVariantLib.cs
- glyphs.cs
- HScrollProperties.cs
- ControlCachePolicy.cs
- SqlDataSourceCache.cs
- DbParameterCollectionHelper.cs
- ConfigurationFileMap.cs
- BooleanConverter.cs
- ListControl.cs
- figurelength.cs
- ListInitExpression.cs
- DocobjHost.cs
- Hyperlink.cs
- ZipIOLocalFileHeader.cs
- LineInfo.cs
- StrictModeSecurityHeaderElementInferenceEngine.cs
- AssemblyNameProxy.cs
- AppearanceEditorPart.cs
- _ChunkParse.cs