Code:
/ 4.0 / 4.0 / 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.
//------------------------------------------------------------------------------
//
// 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
- FixedDocumentPaginator.cs
- AtomParser.cs
- ControlParameter.cs
- ImpersonateTokenRef.cs
- CreateParams.cs
- ObjectToken.cs
- DictionaryContent.cs
- EditorZone.cs
- DefaultObjectMappingItemCollection.cs
- MaterializeFromAtom.cs
- BamlLocalizableResourceKey.cs
- ColumnResizeUndoUnit.cs
- QilNode.cs
- FillRuleValidation.cs
- ColorBuilder.cs
- SqlWorkflowPersistenceService.cs
- TextFormatterImp.cs
- ApplicationSecurityManager.cs
- HtmlInputPassword.cs
- _IPv6Address.cs
- BuildResultCache.cs
- CodeAttributeArgumentCollection.cs
- GregorianCalendarHelper.cs
- ResourceCodeDomSerializer.cs
- DataServiceExpressionVisitor.cs
- HttpChannelListener.cs
- Membership.cs
- PointLight.cs
- PeerCollaboration.cs
- WebPartCollection.cs
- UserNamePasswordValidationMode.cs
- MailHeaderInfo.cs
- NavigationProperty.cs
- CachingHintValidation.cs
- StylusDownEventArgs.cs
- SolidColorBrush.cs
- ManipulationVelocities.cs
- TextServicesManager.cs
- Pair.cs
- SimpleTextLine.cs
- DmlSqlGenerator.cs
- _TLSstream.cs
- AQNBuilder.cs
- GeneralTransform.cs
- RenderTargetBitmap.cs
- CompensableActivity.cs
- Tablet.cs
- ValidatorCompatibilityHelper.cs
- NumberFormatInfo.cs
- MissingFieldException.cs
- EtwTrace.cs
- BidPrivateBase.cs
- Rect3D.cs
- PermissionToken.cs
- X509SecurityTokenAuthenticator.cs
- ObjectAssociationEndMapping.cs
- StreamWithDictionary.cs
- DelegateCompletionCallbackWrapper.cs
- COAUTHIDENTITY.cs
- SubMenuStyleCollectionEditor.cs
- SecurityIdentifierElement.cs
- DescendentsWalkerBase.cs
- ExceptionUtil.cs
- ToolStripControlHost.cs
- CompilerParameters.cs
- DefaultWorkflowTransactionService.cs
- SoapElementAttribute.cs
- BStrWrapper.cs
- WorkflowApplication.cs
- ProxyWebPartConnectionCollection.cs
- Tokenizer.cs
- MessageQueuePermissionEntryCollection.cs
- XmlSchemaFacet.cs
- SettingsContext.cs
- EntityDataSourceWizardForm.cs
- QilReplaceVisitor.cs
- BamlResourceSerializer.cs
- SchemaUtility.cs
- AggregateException.cs
- FrameworkRichTextComposition.cs
- VectorCollectionConverter.cs
- CompoundFileDeflateTransform.cs
- ApplicationGesture.cs
- DirtyTextRange.cs
- TextSearch.cs
- OpCodes.cs
- XomlDesignerLoader.cs
- CompositeCollectionView.cs
- WebDescriptionAttribute.cs
- GenericEnumConverter.cs
- TypeLibraryHelper.cs
- RequestCachingSection.cs
- TextBox.cs
- PointLight.cs
- UnsafeCollabNativeMethods.cs
- TdsParserHelperClasses.cs
- EventLogPermissionAttribute.cs
- CountAggregationOperator.cs
- FixedPosition.cs
- GridItemCollection.cs