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
- HideDisabledControlAdapter.cs
- ConfigUtil.cs
- TransformerInfo.cs
- SafeRightsManagementHandle.cs
- RSAPKCS1KeyExchangeFormatter.cs
- _ConnectOverlappedAsyncResult.cs
- EdmType.cs
- CompiledELinqQueryState.cs
- MetadataArtifactLoaderFile.cs
- ByteAnimation.cs
- StylusPointDescription.cs
- ErrorTableItemStyle.cs
- ListSourceHelper.cs
- WindowsContainer.cs
- ObjectQueryProvider.cs
- _HeaderInfoTable.cs
- XmlStreamStore.cs
- KnownTypesProvider.cs
- LowerCaseStringConverter.cs
- ClientTargetCollection.cs
- LassoHelper.cs
- FlowDocumentScrollViewerAutomationPeer.cs
- BitmapEncoder.cs
- Shape.cs
- WebPartDeleteVerb.cs
- GridViewDeletedEventArgs.cs
- InkPresenterAutomationPeer.cs
- SvcMapFile.cs
- SynchronizationLockException.cs
- SystemFonts.cs
- NativeMethods.cs
- XmlNamedNodeMap.cs
- ToolStripDropDownButton.cs
- DbConnectionClosed.cs
- AuthenticationSection.cs
- X509ChainElement.cs
- CodeGenerationManager.cs
- DecryptedHeader.cs
- DiagnosticTrace.cs
- PointHitTestResult.cs
- GlyphInfoList.cs
- FileInfo.cs
- AdvancedBindingPropertyDescriptor.cs
- EntityDataSourceDataSelectionPanel.cs
- FigureHelper.cs
- SystemUdpStatistics.cs
- CapabilitiesAssignment.cs
- DirectoryObjectSecurity.cs
- RuntimeConfigLKG.cs
- PersonalizationEntry.cs
- MimeMultiPart.cs
- Scripts.cs
- CommandConverter.cs
- ThousandthOfEmRealPoints.cs
- DiagnosticTraceSchemas.cs
- Regex.cs
- FileNameEditor.cs
- ListViewGroup.cs
- MenuCommandsChangedEventArgs.cs
- AsyncResult.cs
- ConsumerConnectionPointCollection.cs
- InstanceDataCollectionCollection.cs
- HebrewCalendar.cs
- HttpCapabilitiesSectionHandler.cs
- FormsAuthenticationCredentials.cs
- RadioButton.cs
- NameValueFileSectionHandler.cs
- TypeAccessException.cs
- WebPartCollection.cs
- DbMetaDataColumnNames.cs
- XamlFilter.cs
- ScriptBehaviorDescriptor.cs
- RoleGroupCollectionEditor.cs
- IFormattable.cs
- WorkItem.cs
- DeclarativeCatalogPart.cs
- SessionEndingEventArgs.cs
- AnimationLayer.cs
- ServiceInstanceProvider.cs
- AspCompat.cs
- SmiMetaDataProperty.cs
- ProcessingInstructionAction.cs
- Win32MouseDevice.cs
- Optimizer.cs
- ConsoleKeyInfo.cs
- DeviceContexts.cs
- oledbmetadatacolumnnames.cs
- ArgIterator.cs
- WorkflowInstance.cs
- DependencySource.cs
- RemoteTokenFactory.cs
- IdleTimeoutMonitor.cs
- WebEventTraceProvider.cs
- BuildManagerHost.cs
- SqlCrossApplyToCrossJoin.cs
- BitmapPalettes.cs
- UserPersonalizationStateInfo.cs
- RelationshipConverter.cs
- NegatedConstant.cs
- ToolTipService.cs