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
- OleDbTransaction.cs
- QueryCacheManager.cs
- RijndaelCryptoServiceProvider.cs
- EpmCustomContentSerializer.cs
- ExtensionElement.cs
- RuntimeArgumentHandle.cs
- UIElementAutomationPeer.cs
- UrlMappingsModule.cs
- SqlDataSourceCache.cs
- ReadOnlyCollection.cs
- GifBitmapEncoder.cs
- HuffCodec.cs
- ISFTagAndGuidCache.cs
- PauseStoryboard.cs
- PasswordBox.cs
- ScaleTransform.cs
- sitestring.cs
- DbXmlEnabledProviderManifest.cs
- PrintPreviewGraphics.cs
- NetCodeGroup.cs
- HScrollBar.cs
- ActivityExecutorOperation.cs
- PagePropertiesChangingEventArgs.cs
- TextElement.cs
- Group.cs
- ImpersonateTokenRef.cs
- NewItemsContextMenuStrip.cs
- PolicyStatement.cs
- InteropEnvironment.cs
- ModelTreeEnumerator.cs
- DbConnectionPoolOptions.cs
- Dynamic.cs
- ADMembershipProvider.cs
- ScaleTransform.cs
- RepeaterItemCollection.cs
- EncodingStreamWrapper.cs
- EditorPartChrome.cs
- CacheRequest.cs
- XmlFormatWriterGenerator.cs
- BlockExpression.cs
- EventMetadata.cs
- PenThreadWorker.cs
- PropertyNames.cs
- _WebProxyDataBuilder.cs
- PropertyChange.cs
- ProgressBarHighlightConverter.cs
- TraceFilter.cs
- Matrix3DStack.cs
- DataColumn.cs
- RegionData.cs
- StateDesigner.cs
- DataServiceExpressionVisitor.cs
- PageParserFilter.cs
- ComplexPropertyEntry.cs
- ExpressionCopier.cs
- SoapTypeAttribute.cs
- AssemblyBuilder.cs
- ReceiveCompletedEventArgs.cs
- TableColumn.cs
- Wizard.cs
- versioninfo.cs
- X509Certificate.cs
- DesignerLabelAdapter.cs
- UnmanagedMemoryStream.cs
- EntityWithKeyStrategy.cs
- Selection.cs
- CharacterHit.cs
- DefaultProxySection.cs
- BaseCodeDomTreeGenerator.cs
- ErrorRuntimeConfig.cs
- OracleTimeSpan.cs
- WorkflowInstanceExtensionCollection.cs
- MsmqIntegrationAppDomainProtocolHandler.cs
- SoapAttributeAttribute.cs
- CopyNamespacesAction.cs
- NavigationFailedEventArgs.cs
- AutoCompleteStringCollection.cs
- DateTimeStorage.cs
- TimeSpanValidator.cs
- XmlDictionaryReader.cs
- WCFServiceClientProxyGenerator.cs
- safelinkcollection.cs
- AnnotationComponentManager.cs
- PointLightBase.cs
- DateTimeStorage.cs
- TextElementEnumerator.cs
- ConfigurationManagerInternal.cs
- WebDisplayNameAttribute.cs
- NumericPagerField.cs
- AttachedAnnotationChangedEventArgs.cs
- MarshalDirectiveException.cs
- RowUpdatingEventArgs.cs
- ModelPerspective.cs
- Point3DIndependentAnimationStorage.cs
- FlowDocumentReaderAutomationPeer.cs
- ReachSerializationUtils.cs
- ExpressionEvaluator.cs
- OperationCanceledException.cs
- DetailsViewRow.cs
- WithStatement.cs