Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / 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(); } } } }
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- InkCanvasSelection.cs
- Misc.cs
- Point3DConverter.cs
- Duration.cs
- KeyValuePair.cs
- Point3DAnimationUsingKeyFrames.cs
- IndexedGlyphRun.cs
- DocumentViewer.cs
- XmlSecureResolver.cs
- FormViewDeletedEventArgs.cs
- DispatcherHookEventArgs.cs
- GuidelineSet.cs
- EnumConverter.cs
- Int16KeyFrameCollection.cs
- AQNBuilder.cs
- MemberAccessException.cs
- DesignerVerbCollection.cs
- EntityDataSourceViewSchema.cs
- ResourceAttributes.cs
- XmlRawWriter.cs
- ControlAdapter.cs
- CodeNamespace.cs
- LineSegment.cs
- InitializationEventAttribute.cs
- ActivityCodeDomSerializer.cs
- SafeArrayRankMismatchException.cs
- SoapObjectInfo.cs
- _NestedSingleAsyncResult.cs
- TrackingMemoryStreamFactory.cs
- Int32.cs
- DesignTimeData.cs
- Page.cs
- Helpers.cs
- SimpleHandlerBuildProvider.cs
- Matrix3DConverter.cs
- AttachedPropertyBrowsableForTypeAttribute.cs
- TabControl.cs
- sitestring.cs
- Gdiplus.cs
- PropertyGridEditorPart.cs
- Itemizer.cs
- EventNotify.cs
- AbstractSvcMapFileLoader.cs
- CodeCatchClause.cs
- IsolatedStorageFilePermission.cs
- GlobalItem.cs
- WebPartZoneCollection.cs
- GridItemProviderWrapper.cs
- PermissionSetEnumerator.cs
- GcSettings.cs
- DocumentApplication.cs
- WriteTimeStream.cs
- ObjectStateEntryDbDataRecord.cs
- GroupBoxAutomationPeer.cs
- MailWebEventProvider.cs
- UserControlFileEditor.cs
- DataServiceBuildProvider.cs
- SiteOfOriginPart.cs
- XmlSubtreeReader.cs
- SystemTcpStatistics.cs
- DBSqlParser.cs
- XmlILCommand.cs
- ConfigXmlDocument.cs
- WindowsFormsLinkLabel.cs
- FilterEventArgs.cs
- IdnElement.cs
- ModelPerspective.cs
- InternalPermissions.cs
- ColorContextHelper.cs
- BindingMAnagerBase.cs
- DNS.cs
- ScopelessEnumAttribute.cs
- EntityDataSourceUtil.cs
- Expander.cs
- IntersectQueryOperator.cs
- SystemException.cs
- FieldToken.cs
- SqlClientWrapperSmiStreamChars.cs
- AppDomainShutdownMonitor.cs
- SQLGuidStorage.cs
- DesignerForm.cs
- WmlControlAdapter.cs
- ClientRuntimeConfig.cs
- DataViewManagerListItemTypeDescriptor.cs
- ResizeGrip.cs
- MetadataFile.cs
- ApplicationInfo.cs
- AppSettingsExpressionBuilder.cs
- IntSecurity.cs
- VerificationException.cs
- PresentationSource.cs
- EdmEntityTypeAttribute.cs
- Errors.cs
- SqlServer2KCompatibilityCheck.cs
- SourceChangedEventArgs.cs
- HttpApplicationFactory.cs
- XmlUrlEditor.cs
- SQLConvert.cs
- SecurityTimestamp.cs
- XmlSchemas.cs