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
- listitem.cs
- DispatcherHookEventArgs.cs
- GeometryDrawing.cs
- UnsafeNativeMethods.cs
- Int16AnimationBase.cs
- LiteralText.cs
- NamespaceList.cs
- ReadingWritingEntityEventArgs.cs
- ControlBuilder.cs
- OdbcEnvironment.cs
- SrgsElementFactory.cs
- ExpanderAutomationPeer.cs
- ClrPerspective.cs
- XmlBindingWorker.cs
- DragDeltaEventArgs.cs
- ServiceInstallComponent.cs
- StringDictionary.cs
- ToolStripArrowRenderEventArgs.cs
- XamlSerializer.cs
- Animatable.cs
- ValueUnavailableException.cs
- HtmlUtf8RawTextWriter.cs
- StateMachine.cs
- RegexGroupCollection.cs
- RowUpdatingEventArgs.cs
- RectangleHotSpot.cs
- ISCIIEncoding.cs
- DropDownHolder.cs
- ActionMessageFilterTable.cs
- InstanceHandle.cs
- ComponentEditorPage.cs
- LineInfo.cs
- DataGridViewBindingCompleteEventArgs.cs
- SendMailErrorEventArgs.cs
- AnnotationMap.cs
- PropertyMapper.cs
- ISAPIApplicationHost.cs
- DesignTimeVisibleAttribute.cs
- SystemIPGlobalProperties.cs
- ConfigurationPropertyAttribute.cs
- ToolBarButtonClickEvent.cs
- PlanCompiler.cs
- StringUtil.cs
- AdRotator.cs
- BindingBase.cs
- HttpPostClientProtocol.cs
- TrackingServices.cs
- WebPartDescriptionCollection.cs
- ProxyFragment.cs
- QueryableDataSourceView.cs
- SpecularMaterial.cs
- CodeCommentStatementCollection.cs
- ServiceChannelFactory.cs
- StorageComplexTypeMapping.cs
- DbDataRecord.cs
- mediaclock.cs
- DurableMessageDispatchInspector.cs
- WindowsPrincipal.cs
- ShaderRenderModeValidation.cs
- PolyLineSegment.cs
- CompoundFileIOPermission.cs
- NetNamedPipeSecurityElement.cs
- RuntimeVariablesExpression.cs
- BaseConfigurationRecord.cs
- ResponseStream.cs
- Lasso.cs
- WindowsFont.cs
- ExceptionUtil.cs
- BulletedList.cs
- MergePropertyDescriptor.cs
- ImportedNamespaceContextItem.cs
- ToolStripProgressBar.cs
- MenuBase.cs
- ToolStripLabel.cs
- LocatorPartList.cs
- Util.cs
- DispatchOperationRuntime.cs
- AudioBase.cs
- InstancePersistenceEvent.cs
- EventLogEntry.cs
- ReplacementText.cs
- PrivateFontCollection.cs
- TabPanel.cs
- MetafileHeader.cs
- Bold.cs
- ItemCheckEvent.cs
- Ipv6Element.cs
- ContextProperty.cs
- BitmapEffect.cs
- ToolStripSplitStackLayout.cs
- ActiveXContainer.cs
- UserPersonalizationStateInfo.cs
- FieldMetadata.cs
- StringToken.cs
- AssemblySettingAttributes.cs
- MenuBindingsEditor.cs
- ServiceSecurityAuditElement.cs
- TextElement.cs
- FontStretch.cs
- FontFamilyValueSerializer.cs