Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / UI / WebControls / TreeNodeStyleCollection.cs / 1305376 / TreeNodeStyleCollection.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 TreeNodeStyleCollection : StateManagedCollection {
private static readonly Type[] knownTypes = new Type[] { typeof(TreeNodeStyle) };
internal TreeNodeStyleCollection() {
}
protected override void OnInsert(int index, object value) {
base.OnInsert(index, value);
if (value is TreeNodeStyle) {
TreeNodeStyle style = (TreeNodeStyle)value;
style.Font.Underline = style.Font.Underline;
}
else {
throw new ArgumentException(SR.GetString(SR.TreeNodeStyleCollection_InvalidArgument), "value");
}
}
public TreeNodeStyle this[int i] {
get {
return (TreeNodeStyle)((IList)this)[i];
}
set {
((IList)this)[i] = value;
}
}
public int Add(TreeNodeStyle style) {
return ((IList)this).Add(style);
}
public bool Contains(TreeNodeStyle style) {
return ((IList)this).Contains(style);
}
public void CopyTo(TreeNodeStyle[] styleArray, int index) {
base.CopyTo(styleArray, index);
}
public int IndexOf(TreeNodeStyle style) {
return ((IList)this).IndexOf(style);
}
public void Insert(int index, TreeNodeStyle style) {
((IList)this).Insert(index, style);
}
protected override object CreateKnownType(int index) {
return new TreeNodeStyle();
}
protected override Type[] GetKnownTypes() {
return knownTypes;
}
public void Remove(TreeNodeStyle style) {
((IList)this).Remove(style);
}
public void RemoveAt(int index) {
((IList)this).RemoveAt(index);
}
protected override void SetDirtyObject(object o) {
if (o is TreeNodeStyle) {
((TreeNodeStyle)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
- AnimationClock.cs
- SymDocumentType.cs
- KnownTypesHelper.cs
- GridViewColumnHeaderAutomationPeer.cs
- MetaTableHelper.cs
- DateTimeConverter.cs
- CodeDomConfigurationHandler.cs
- BufferedMessageWriter.cs
- DataControlFieldTypeEditor.cs
- SqlClientMetaDataCollectionNames.cs
- StructuredTypeInfo.cs
- DatePickerTextBox.cs
- CompleteWizardStep.cs
- ToolStripContentPanel.cs
- PassportAuthentication.cs
- XPathDocumentNavigator.cs
- SQLDateTimeStorage.cs
- SqlTriggerAttribute.cs
- webeventbuffer.cs
- PointAnimationUsingKeyFrames.cs
- PrinterSettings.cs
- TaskDesigner.cs
- ListCollectionView.cs
- StringCollection.cs
- ImportOptions.cs
- CuspData.cs
- SupportsEventValidationAttribute.cs
- RequestCachePolicyConverter.cs
- DataControlExtensions.cs
- WhitespaceSignificantCollectionAttribute.cs
- XmlComment.cs
- StateInitialization.cs
- IsolatedStorage.cs
- WebPartZoneCollection.cs
- Int64AnimationUsingKeyFrames.cs
- QueryCacheKey.cs
- SkipStoryboardToFill.cs
- SqlAliaser.cs
- AssemblyFilter.cs
- ComponentChangingEvent.cs
- FixUpCollection.cs
- ResourceDescriptionAttribute.cs
- Validator.cs
- UserPreferenceChangingEventArgs.cs
- HuffCodec.cs
- RunWorkerCompletedEventArgs.cs
- BooleanKeyFrameCollection.cs
- UnsafeNativeMethodsTablet.cs
- BmpBitmapDecoder.cs
- DataGridRowAutomationPeer.cs
- XmlWriterTraceListener.cs
- FaultImportOptions.cs
- Ipv6Element.cs
- RectAnimationUsingKeyFrames.cs
- UnicodeEncoding.cs
- HMACMD5.cs
- PipelineModuleStepContainer.cs
- HorizontalAlignConverter.cs
- RecognitionResult.cs
- validation.cs
- SessionSwitchEventArgs.cs
- InstanceKeyCompleteException.cs
- ConsumerConnectionPointCollection.cs
- CriticalExceptions.cs
- PanelStyle.cs
- DataServiceCollectionOfT.cs
- XmlSchemaSimpleTypeUnion.cs
- FontInfo.cs
- SQLString.cs
- securestring.cs
- DesignerActionHeaderItem.cs
- CommittableTransaction.cs
- Delay.cs
- OutOfProcStateClientManager.cs
- Effect.cs
- MemberAssignment.cs
- UniqueEventHelper.cs
- _StreamFramer.cs
- filewebresponse.cs
- ConstrainedDataObject.cs
- Point3D.cs
- XmlQueryTypeFactory.cs
- RecognizedWordUnit.cs
- TimeSpanValidator.cs
- TraceContextEventArgs.cs
- XhtmlBasicListAdapter.cs
- SqlBinder.cs
- PropertyEntry.cs
- GroupAggregateExpr.cs
- XhtmlBasicImageAdapter.cs
- ChannelParameterCollection.cs
- StsCommunicationException.cs
- GifBitmapEncoder.cs
- SafeBitVector32.cs
- HyperLinkStyle.cs
- GeometryGroup.cs
- DbConnectionPoolGroupProviderInfo.cs
- SubMenuStyle.cs
- CommandConverter.cs
- UnhandledExceptionEventArgs.cs