1 <?xml version="1.0" encoding="utf-8"?>
2 <Type Name="DrawTreeNodeEventArgs" FullName="System.Windows.Forms.DrawTreeNodeEventArgs">
3 <TypeSignature Language="C#" Value="public class DrawTreeNodeEventArgs : EventArgs" />
5 <AssemblyName>System.Windows.Forms</AssemblyName>
6 <AssemblyVersion>2.0.0.0</AssemblyVersion>
9 <BaseTypeName>System.EventArgs</BaseTypeName>
13 <since version=".NET 2.0" />
15 <attribution license="cc4" from="Microsoft" modified="false" />
16 <para>Use the <see cref="E:System.Windows.Forms.TreeView.DrawNode" /> event to customize the appearance of nodes in a <see cref="T:System.Windows.Forms.TreeView" /> control using owner drawing.</para>
17 <para>The <see cref="E:System.Windows.Forms.TreeView.DrawNode" /> event is raised by a <see cref="T:System.Windows.Forms.TreeView" /> control when its <see cref="P:System.Windows.Forms.TreeView.DrawMode" /> property is set to <see cref="F:System.Windows.Forms.TreeViewDrawMode.OwnerDrawAll" /> or <see cref="F:System.Windows.Forms.TreeViewDrawMode.OwnerDrawText" /> and a node is displayed or updated. The <see cref="T:System.Windows.Forms.DrawTreeNodeEventArgs" /> passed to the event handler contains information about the node to draw as well as providing methods to help you draw the node.</para>
18 <para>Use the <see cref="P:System.Windows.Forms.DrawTreeNodeEventArgs.State" /> or <see cref="P:System.Windows.Forms.DrawTreeNodeEventArgs.Node" /> properties to retrieve information about the node to draw. Use the <see cref="P:System.Windows.Forms.DrawTreeNodeEventArgs.Graphics" /> property to do the actual drawing within the area specified by the <see cref="P:System.Windows.Forms.DrawTreeNodeEventArgs.Bounds" /> property. To make the operating system draw a node that does not need to be owner drawn, set the <see cref="P:System.Windows.Forms.DrawTreeNodeEventArgs.DrawDefault" /> property to true.</para>
19 <para>When the <see cref="P:System.Windows.Forms.TreeView.DrawMode" /> property is set to <see cref="F:System.Windows.Forms.TreeViewDrawMode.OwnerDrawText" />, the area indicated by the <see cref="P:System.Windows.Forms.DrawTreeNodeEventArgs.Bounds" /> property includes the label portion of the node only. When the <see cref="P:System.Windows.Forms.TreeView.DrawMode" /> property is set to <see cref="F:System.Windows.Forms.TreeViewDrawMode.OwnerDrawAll" />, the <see cref="P:System.Windows.Forms.DrawTreeNodeEventArgs.Bounds" /> area includes the entire node, including the area typically used for icons, checkboxes, plus and minus signs, and lines connecting the nodes.</para>
22 <attribution license="cc4" from="Microsoft" modified="false" />
23 <para>Provides data for the <see cref="E:System.Windows.Forms.TreeView.DrawNode" /> event.</para>
27 <Member MemberName=".ctor">
28 <MemberSignature Language="C#" Value="public DrawTreeNodeEventArgs (System.Drawing.Graphics graphics, System.Windows.Forms.TreeNode node, System.Drawing.Rectangle bounds, System.Windows.Forms.TreeNodeStates state);" />
29 <MemberType>Constructor</MemberType>
31 <Parameter Name="graphics" Type="System.Drawing.Graphics" />
32 <Parameter Name="node" Type="System.Windows.Forms.TreeNode" />
33 <Parameter Name="bounds" Type="System.Drawing.Rectangle" />
34 <Parameter Name="state" Type="System.Windows.Forms.TreeNodeStates" />
37 <remarks>To be added.</remarks>
38 <since version=".NET 2.0" />
40 <attribution license="cc4" from="Microsoft" modified="false" />
41 <para>Initializes a new instance of the <see cref="T:System.Windows.Forms.DrawTreeNodeEventArgs" /> class.</para>
43 <param name="graphics">
44 <attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.Drawing.Graphics" /> surface on which to draw. </param>
46 <attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.Windows.Forms.TreeNode" /> to draw. </param>
48 <attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.Drawing.Rectangle" /> within which to draw. </param>
50 <attribution license="cc4" from="Microsoft" modified="false" />A bitwise combination of the <see cref="T:System.Windows.Forms.TreeNodeStates" /> values indicating the current state of the <see cref="T:System.Windows.Forms.TreeNode" /> to draw. </param>
53 <AssemblyVersion>2.0.0.0</AssemblyVersion>
56 <Member MemberName="Bounds">
57 <MemberSignature Language="C#" Value="public System.Drawing.Rectangle Bounds { get; }" />
58 <MemberType>Property</MemberType>
60 <ReturnType>System.Drawing.Rectangle</ReturnType>
63 <value>To be added.</value>
64 <since version=".NET 2.0" />
66 <attribution license="cc4" from="Microsoft" modified="false" />
67 <para>The location specified by this property is relative to the upper-left corner of the <see cref="T:System.Windows.Forms.TreeView" /> control.</para>
68 <para>When the <see cref="P:System.Windows.Forms.TreeView.DrawMode" /> property is set to <see cref="F:System.Windows.Forms.TreeViewDrawMode.OwnerDrawText" />, the area specified by the <see cref="P:System.Windows.Forms.DrawTreeNodeEventArgs.Bounds" /> property is the region in which a node can be clicked to select it. If you draw outside this hit test region, you should provide your own code for selecting a node when its visible area is clicked. You may also want to provide your own hit test code when the <see cref="P:System.Windows.Forms.TreeView.DrawMode" /> property is set to <see cref="F:System.Windows.Forms.TreeViewDrawMode.OwnerDrawAll" />. In this mode, the <see cref="P:System.Windows.Forms.DrawTreeNodeEventArgs.Bounds" /> property encompasses the whole node across the entire width of the <see cref="T:System.Windows.Forms.TreeView" /> control, rather than the just hit test region.</para>
71 <attribution license="cc4" from="Microsoft" modified="false" />
72 <para>Gets the size and location of the <see cref="T:System.Windows.Forms.TreeNode" /> to draw.</para>
76 <AssemblyVersion>2.0.0.0</AssemblyVersion>
79 <Member MemberName="DrawDefault">
80 <MemberSignature Language="C#" Value="public bool DrawDefault { set; get; }" />
81 <MemberType>Property</MemberType>
83 <ReturnType>System.Boolean</ReturnType>
86 <value>To be added.</value>
87 <since version=".NET 2.0" />
89 <attribution license="cc4" from="Microsoft" modified="false" />
90 <para>Set this property to true for nodes that you do not want to customize when you handle the <see cref="E:System.Windows.Forms.TreeView.DrawNode" /> event. For example, this is useful when you want to customize only nodes that are in a specific state.</para>
93 <attribution license="cc4" from="Microsoft" modified="false" />
94 <para>Gets or sets a value indicating whether the <see cref="T:System.Windows.Forms.TreeNode" /> should be drawn by the operating system rather than being owner drawn.</para>
98 <AssemblyVersion>2.0.0.0</AssemblyVersion>
101 <Member MemberName="Graphics">
102 <MemberSignature Language="C#" Value="public System.Drawing.Graphics Graphics { get; }" />
103 <MemberType>Property</MemberType>
105 <ReturnType>System.Drawing.Graphics</ReturnType>
108 <value>To be added.</value>
109 <since version=".NET 2.0" />
111 <attribution license="cc4" from="Microsoft" modified="false" />
112 <para>The <see cref="T:System.Drawing.Graphics" /> class provides properties and methods useful for drawing on the display device.</para>
115 <attribution license="cc4" from="Microsoft" modified="false" />
116 <para>Gets the <see cref="T:System.Drawing.Graphics" /> object used to draw the <see cref="T:System.Windows.Forms.TreeNode" />.</para>
120 <AssemblyVersion>2.0.0.0</AssemblyVersion>
123 <Member MemberName="Node">
124 <MemberSignature Language="C#" Value="public System.Windows.Forms.TreeNode Node { get; }" />
125 <MemberType>Property</MemberType>
127 <ReturnType>System.Windows.Forms.TreeNode</ReturnType>
130 <value>To be added.</value>
131 <since version=".NET 2.0" />
133 <attribution license="cc4" from="Microsoft" modified="false" />
134 <para>Use this property to access the <see cref="T:System.Windows.Forms.TreeNode" /> object to draw. This is useful when the <see cref="P:System.Windows.Forms.DrawTreeNodeEventArgs.State" /> property does not provide adequate information to meet your needs. The <see cref="P:System.Windows.Forms.DrawTreeNodeEventArgs.State" /> property provides only basic state information that you can use, for example, to determine whether a node is selected, checked, or focused. The <see cref="P:System.Windows.Forms.DrawTreeNodeEventArgs.Node" /> property, on the other hand, allows you to access all members of the <see cref="T:System.Windows.Forms.TreeNode" /> object. You must access the node directly, for example, when you want to determine its expansion state.</para>
137 <attribution license="cc4" from="Microsoft" modified="false" />
138 <para>Gets the <see cref="T:System.Windows.Forms.TreeNode" /> to draw.</para>
142 <AssemblyVersion>2.0.0.0</AssemblyVersion>
145 <Member MemberName="State">
146 <MemberSignature Language="C#" Value="public System.Windows.Forms.TreeNodeStates State { get; }" />
147 <MemberType>Property</MemberType>
149 <ReturnType>System.Windows.Forms.TreeNodeStates</ReturnType>
152 <value>To be added.</value>
153 <since version=".NET 2.0" />
155 <attribution license="cc4" from="Microsoft" modified="false" />
156 <para>Use this property to check whether the <see cref="T:System.Windows.Forms.TreeNode" /> object to draw is in a particular state. This property provides only basic state information about the node. You can use this property, for example, to determine whether a node is selected, checked, or focused. If you need to know more, retrieve the node through the <see cref="P:System.Windows.Forms.DrawTreeNodeEventArgs.Node" /> property. For example, to determine whether the node is expanded, you must retrieve the node and check the <see cref="P:System.Windows.Forms.TreeNode.IsExpanded" /> property.</para>
159 <attribution license="cc4" from="Microsoft" modified="false" />
160 <para>Gets the current state of the <see cref="T:System.Windows.Forms.TreeNode" /> to draw.</para>
164 <AssemblyVersion>2.0.0.0</AssemblyVersion>