Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- GenericsInstances.cs
- DataMisalignedException.cs
- IndentedTextWriter.cs
- XmlSchemaExporter.cs
- OdbcEnvironment.cs
- WebDisplayNameAttribute.cs
- ServerValidateEventArgs.cs
- MsmqIntegrationBinding.cs
- UpdateProgress.cs
- ListView.cs
- TextParagraphProperties.cs
- OdbcFactory.cs
- CatalogPart.cs
- BaseTemplateBuildProvider.cs
- SessionStateSection.cs
- Cloud.cs
- ProxyHelper.cs
- StyleXamlTreeBuilder.cs
- FormatterConverter.cs
- TemplateInstanceAttribute.cs
- XamlRtfConverter.cs
- DataControlImageButton.cs
- XmlTextAttribute.cs
- SqlServer2KCompatibilityAnnotation.cs
- ScrollViewerAutomationPeer.cs
- OdbcFactory.cs
- DataSourceProvider.cs
- EventHandlingScope.cs
- WindowsFormsSynchronizationContext.cs
- ApplicationInfo.cs
- TimeoutValidationAttribute.cs
- NetSectionGroup.cs
- Matrix3D.cs
- DataFieldConverter.cs
- MemberJoinTreeNode.cs
- HttpHeaderCollection.cs
- TdsParserStateObject.cs
- Parser.cs
- ExpressionBinding.cs
- SecureStringHasher.cs
- ButtonField.cs
- ProcessHostFactoryHelper.cs
- TreeNodeMouseHoverEvent.cs
- RtfControlWordInfo.cs
- rsa.cs
- ObjectPersistData.cs
- AttributeEmitter.cs
- SecurityPolicySection.cs
- CssClassPropertyAttribute.cs
- Header.cs
- ServiceOperationParameter.cs
- DataGridViewSelectedRowCollection.cs
- Stack.cs
- NamespaceList.cs
- EditingCommands.cs
- Profiler.cs
- DecoderReplacementFallback.cs
- arclist.cs
- SynchronizationLockException.cs
- ValueType.cs
- SqlConnection.cs
- HttpHostedTransportConfiguration.cs
- WorkflowValidationFailedException.cs
- XmlAttributeOverrides.cs
- SizeFConverter.cs
- ItemAutomationPeer.cs
- WebServiceReceive.cs
- PeerNearMe.cs
- ToolConsole.cs
- Root.cs
- AlphaSortedEnumConverter.cs
- RegisteredDisposeScript.cs
- ApplyImportsAction.cs
- SoapSchemaExporter.cs
- TagElement.cs
- OperatingSystem.cs
- MetadataFile.cs
- ResponseBodyWriter.cs
- VariableAction.cs
- DashStyle.cs
- MonitoringDescriptionAttribute.cs
- XmlUrlResolver.cs
- PermissionToken.cs
- Connector.xaml.cs
- Module.cs
- MimeImporter.cs
- CallbackHandler.cs
- WebPartVerbsEventArgs.cs
- ProxyFragment.cs
- DtdParser.cs
- SqlCachedBuffer.cs
- SQLInt64.cs
- ContextProperty.cs
- ReaderWriterLock.cs
- COM2ExtendedUITypeEditor.cs
- FactoryGenerator.cs
- BinaryObjectWriter.cs
- SafeIUnknown.cs
- MenuBase.cs
- UnsafeNativeMethodsCLR.cs