Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / WinForms / Managed / System / WinForms / DrawTreeNodeEventArgs.cs / 1 / DrawTreeNodeEventArgs.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.Windows.Forms
{
using System.Diagnostics;
using System;
using System.ComponentModel;
using System.Drawing;
using Microsoft.Win32;
using System.Windows.Forms.VisualStyles;
///
///
/// This class contains the information a user needs to paint TreeView nodes.
///
public class DrawTreeNodeEventArgs : EventArgs
{
private readonly Graphics graphics;
private readonly TreeNode node;
private readonly Rectangle bounds;
private readonly TreeNodeStates state;
private bool drawDefault;
///
///
/// Creates a new DrawTreeNodeEventArgs with the given parameters.
///
public DrawTreeNodeEventArgs(Graphics graphics, TreeNode node, Rectangle bounds,
TreeNodeStates state)
{
this.graphics = graphics;
this.node = node;
this.bounds = bounds;
this.state = state;
this.drawDefault = false;
}
///
///
/// Causes the item do be drawn by the system instead of owner drawn.
/// NOTE: In OwnerDrawText mode, setting this to true is same as calling DrawText.
///
public bool DrawDefault {
get {
return drawDefault;
}
set {
drawDefault = value;
}
}
///
///
/// Graphics object with which painting should be done.
///
public Graphics Graphics
{
get
{
return graphics;
}
}
///
///
/// The node to be painted.
///
public TreeNode Node
{
get
{
return node;
}
}
///
///
/// The rectangle outlining the area in which the painting should be done.
///
public Rectangle Bounds
{
get
{
return bounds;
}
}
///
///
/// Miscellaneous state information.
///
public TreeNodeStates State
{
get
{
return state;
}
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ImageMap.cs
- CellLabel.cs
- XmlIterators.cs
- OleDbConnectionPoolGroupProviderInfo.cs
- FormatSettings.cs
- DelayedRegex.cs
- SecureEnvironment.cs
- DiscoveryExceptionDictionary.cs
- BaseCollection.cs
- StackBuilderSink.cs
- SynchronizedRandom.cs
- DeclaredTypeElement.cs
- MenuAdapter.cs
- DataTemplateSelector.cs
- TheQuery.cs
- IndentedWriter.cs
- TextTreeUndo.cs
- DataSourceBooleanViewSchemaConverter.cs
- ZipArchive.cs
- Dispatcher.cs
- TextFormatter.cs
- FixedDocumentSequencePaginator.cs
- CharacterString.cs
- HttpListener.cs
- SymDocumentType.cs
- ExpressionQuoter.cs
- CreateUserWizard.cs
- Repeater.cs
- WSFederationHttpSecurity.cs
- Normalization.cs
- RegexWriter.cs
- ExternalException.cs
- StreamGeometry.cs
- SchemaElementDecl.cs
- Regex.cs
- ZeroOpNode.cs
- RecipientInfo.cs
- AssemblyCollection.cs
- DateTimeStorage.cs
- NullRuntimeConfig.cs
- ChannelBase.cs
- TdsParameterSetter.cs
- DefaultValueConverter.cs
- TimeStampChecker.cs
- HostedImpersonationContext.cs
- PasswordPropertyTextAttribute.cs
- ListChangedEventArgs.cs
- DataSourceCache.cs
- OperatingSystem.cs
- DictionaryTraceRecord.cs
- MLangCodePageEncoding.cs
- RuntimeEnvironment.cs
- AnimationClockResource.cs
- FlowDocumentScrollViewerAutomationPeer.cs
- TypeConverterHelper.cs
- login.cs
- RequestValidator.cs
- DateTimeConstantAttribute.cs
- AnimatedTypeHelpers.cs
- Merger.cs
- IndicShape.cs
- WebZone.cs
- SqlBulkCopyColumnMappingCollection.cs
- XmlNodeChangedEventManager.cs
- Calendar.cs
- ReadOnlyObservableCollection.cs
- NamespaceEmitter.cs
- RotateTransform3D.cs
- UiaCoreProviderApi.cs
- WeakHashtable.cs
- MouseOverProperty.cs
- XmlText.cs
- SafeMarshalContext.cs
- RadialGradientBrush.cs
- PropertyEmitterBase.cs
- shaperfactoryquerycacheentry.cs
- SrgsText.cs
- TemplateKeyConverter.cs
- DataServiceQueryContinuation.cs
- AnimationTimeline.cs
- ClientSideQueueItem.cs
- HwndSource.cs
- RadioButton.cs
- ExpressionEditorAttribute.cs
- List.cs
- SubtreeProcessor.cs
- AttachedPropertyMethodSelector.cs
- GatewayIPAddressInformationCollection.cs
- VectorAnimationUsingKeyFrames.cs
- BitmapEncoder.cs
- RelatedCurrencyManager.cs
- CharConverter.cs
- SettingsSection.cs
- DataBoundControlParameterTarget.cs
- DiscoveryClientDuplexChannel.cs
- ArgumentOutOfRangeException.cs
- WebEncodingValidatorAttribute.cs
- ConfigurationStrings.cs
- ReadOnlyMetadataCollection.cs
- ValidationError.cs