Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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.
//
//-----------------------------------------------------------------------------
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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- StringOutput.cs
- Pool.cs
- Process.cs
- XmlSchemaCompilationSettings.cs
- QuerySetOp.cs
- SymbolResolver.cs
- OleDbWrapper.cs
- Scene3D.cs
- CodeEventReferenceExpression.cs
- DoubleLink.cs
- AlternationConverter.cs
- StateChangeEvent.cs
- RelationshipType.cs
- DbParameterCollectionHelper.cs
- SmtpDigestAuthenticationModule.cs
- GridViewColumn.cs
- NavigationEventArgs.cs
- counter.cs
- FormClosingEvent.cs
- FeatureManager.cs
- AnonymousIdentificationModule.cs
- ValueConversionAttribute.cs
- DocumentViewerBaseAutomationPeer.cs
- TextBreakpoint.cs
- DataTableNewRowEvent.cs
- securestring.cs
- SymmetricKey.cs
- Set.cs
- CodeSnippetTypeMember.cs
- Pens.cs
- MobileRedirect.cs
- DocumentApplication.cs
- hebrewshape.cs
- Privilege.cs
- CancellationScope.cs
- XamlDesignerSerializationManager.cs
- WindowsListViewGroupSubsetLink.cs
- AnonymousIdentificationModule.cs
- Control.cs
- ComplexPropertyEntry.cs
- AbsoluteQuery.cs
- TypeInfo.cs
- TabControlAutomationPeer.cs
- basevalidator.cs
- ManipulationDeltaEventArgs.cs
- DataGridViewCellCancelEventArgs.cs
- WebSysDisplayNameAttribute.cs
- CipherData.cs
- MetadataItem.cs
- MarkupExtensionReturnTypeAttribute.cs
- ExpressionBuilderCollection.cs
- InternalControlCollection.cs
- ProcessHostFactoryHelper.cs
- formatstringdialog.cs
- PolicyStatement.cs
- ToolStripDropDownClosedEventArgs.cs
- ExpressionConverter.cs
- MiniAssembly.cs
- LinqDataSourceStatusEventArgs.cs
- MemberBinding.cs
- CompositeTypefaceMetrics.cs
- SchemaManager.cs
- WebRequest.cs
- SchemaCollectionCompiler.cs
- OrthographicCamera.cs
- HashCryptoHandle.cs
- DynamicILGenerator.cs
- PrintController.cs
- AdornerPresentationContext.cs
- CorrelationValidator.cs
- ProtocolsConfiguration.cs
- WmlFormAdapter.cs
- String.cs
- DescendantQuery.cs
- FlowDocumentPage.cs
- GeneralTransform3DGroup.cs
- EntityCommandExecutionException.cs
- Stacktrace.cs
- SerializationSectionGroup.cs
- SelectionService.cs
- JavaScriptString.cs
- CurrentChangingEventArgs.cs
- RotationValidation.cs
- QueueException.cs
- XmlAttributeAttribute.cs
- _RegBlobWebProxyDataBuilder.cs
- TreeBuilder.cs
- NotificationContext.cs
- CalculatedColumn.cs
- TraceEventCache.cs
- Token.cs
- XmlAttributeOverrides.cs
- GenericEnumerator.cs
- EncodingFallbackAwareXmlTextWriter.cs
- ProjectionPlanCompiler.cs
- NamedPipeAppDomainProtocolHandler.cs
- _TimerThread.cs
- MailWriter.cs
- Range.cs
- VirtualizedItemProviderWrapper.cs