-
Notifications
You must be signed in to change notification settings - Fork 1.5k
/
ActivityDesignerPaint.xml
364 lines (333 loc) · 34.5 KB
/
ActivityDesignerPaint.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
<Type Name="ActivityDesignerPaint" FullName="System.Workflow.ComponentModel.Design.ActivityDesignerPaint">
<TypeSignature Language="C#" Value="public static class ActivityDesignerPaint" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi abstract sealed beforefieldinit ActivityDesignerPaint extends System.Object" />
<TypeSignature Language="DocId" Value="T:System.Workflow.ComponentModel.Design.ActivityDesignerPaint" />
<TypeSignature Language="VB.NET" Value="Public Class ActivityDesignerPaint" />
<TypeSignature Language="F#" Value="type ActivityDesignerPaint = class" />
<TypeSignature Language="C++ CLI" Value="public ref class ActivityDesignerPaint abstract sealed" />
<AssemblyInfo>
<AssemblyName>System.Workflow.ComponentModel</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Object</BaseTypeName>
</Base>
<Interfaces />
<Attributes>
<Attribute FrameworkAlternate="netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1">
<AttributeName Language="C#">[System.Obsolete("The System.Workflow.* types are deprecated. Instead, please use the new types from System.Activities.*")]</AttributeName>
<AttributeName Language="F#">[<System.Obsolete("The System.Workflow.* types are deprecated. Instead, please use the new types from System.Activities.*")>]</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>Provides static methods used to draw user interface elements on activity designer surfaces. This class cannot be inherited.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
> [!NOTE]
> [!INCLUDE[DeprecatedContent](~/includes/deprecatedcontent-md.md)]
## Examples
The following example demonstrates a way to use the <xref:System.Workflow.ComponentModel.Design.ActivityDesignerPaint> class to draw a custom activity on the workflow design surface. A rounded rectangle is first drawn using the <xref:System.Workflow.ComponentModel.Design.ActivityDesignerPaint.DrawRoundedRectangle%2A> method. Text is then drawn using <xref:System.Workflow.ComponentModel.Design.ActivityDesignerPaint.DrawText%2A> and is placed at the location of the <xref:System.Workflow.ComponentModel.Design.ActivityDesigner.TextRectangle%2A> of the <xref:System.Workflow.ComponentModel.Design.ActivityDesigner>. Additionally, the <xref:System.Workflow.ComponentModel.Design.ActivityDesigner.Image%2A> associated with the <xref:System.Workflow.ComponentModel.Design.ActivityDesigner> is drawn using the <xref:System.Workflow.ComponentModel.Design.ActivityDesignerPaint.DrawImage%2A> method of the <xref:System.Workflow.ComponentModel.Design.ActivityDesignerPaint> class. Finally, an expand button used by a <xref:System.Workflow.ComponentModel.CompositeActivity> is drawn using the <xref:System.Workflow.ComponentModel.Design.ActivityDesignerPaint.DrawExpandButton%2A>.
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/wf_samples/cs/snippets.cs" id="Snippet78":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/wf_samples/vb/snippets.vb" id="Snippet78":::
]]></format>
</remarks>
</Docs>
<Members>
<Member MemberName="Draw3DButton">
<MemberSignature Language="C#" Value="public static void Draw3DButton (System.Drawing.Graphics graphics, System.Drawing.Image image, System.Drawing.Rectangle bounds, float transparency, System.Windows.Forms.ButtonState buttonState);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig void Draw3DButton(class System.Drawing.Graphics graphics, class System.Drawing.Image image, valuetype System.Drawing.Rectangle bounds, float32 transparency, valuetype System.Windows.Forms.ButtonState buttonState) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Workflow.ComponentModel.Design.ActivityDesignerPaint.Draw3DButton(System.Drawing.Graphics,System.Drawing.Image,System.Drawing.Rectangle,System.Single,System.Windows.Forms.ButtonState)" />
<MemberSignature Language="VB.NET" Value="Public Shared Sub Draw3DButton (graphics As Graphics, image As Image, bounds As Rectangle, transparency As Single, buttonState As ButtonState)" />
<MemberSignature Language="F#" Value="static member Draw3DButton : System.Drawing.Graphics * System.Drawing.Image * System.Drawing.Rectangle * single * System.Windows.Forms.ButtonState -> unit" Usage="System.Workflow.ComponentModel.Design.ActivityDesignerPaint.Draw3DButton (graphics, image, bounds, transparency, buttonState)" />
<MemberSignature Language="C++ CLI" Value="public:
 static void Draw3DButton(System::Drawing::Graphics ^ graphics, System::Drawing::Image ^ image, System::Drawing::Rectangle bounds, float transparency, System::Windows::Forms::ButtonState buttonState);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Workflow.ComponentModel</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="graphics" Type="System.Drawing.Graphics" />
<Parameter Name="image" Type="System.Drawing.Image" />
<Parameter Name="bounds" Type="System.Drawing.Rectangle" />
<Parameter Name="transparency" Type="System.Single" />
<Parameter Name="buttonState" Type="System.Windows.Forms.ButtonState" />
</Parameters>
<Docs>
<param name="graphics">The <see cref="T:System.Drawing.Graphics" /> on which to draw the 3-dimensional button.</param>
<param name="image">The <see cref="T:System.Drawing.Image" /> to draw on the button.</param>
<param name="bounds">The <see cref="T:System.Drawing.Rectangle" /> that defines the bounds of the button.</param>
<param name="transparency">The single-precision floating-point number to specify the transparency level of the button.</param>
<param name="buttonState">The <see cref="T:System.Windows.Forms.ButtonState" /> enumeration value to specify the appearance of the button.</param>
<summary>Draws a 3-dimensional button on the activity designer surface.</summary>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="graphics" /> contains a null reference (<see langword="Nothing" /> in Visual Basic).</exception>
</Docs>
</Member>
<Member MemberName="DrawExpandButton">
<MemberSignature Language="C#" Value="public static void DrawExpandButton (System.Drawing.Graphics graphics, System.Drawing.Rectangle boundingRect, bool drawExpanded, System.Workflow.ComponentModel.Design.CompositeDesignerTheme compositeDesignerTheme);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig void DrawExpandButton(class System.Drawing.Graphics graphics, valuetype System.Drawing.Rectangle boundingRect, bool drawExpanded, class System.Workflow.ComponentModel.Design.CompositeDesignerTheme compositeDesignerTheme) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Workflow.ComponentModel.Design.ActivityDesignerPaint.DrawExpandButton(System.Drawing.Graphics,System.Drawing.Rectangle,System.Boolean,System.Workflow.ComponentModel.Design.CompositeDesignerTheme)" />
<MemberSignature Language="VB.NET" Value="Public Shared Sub DrawExpandButton (graphics As Graphics, boundingRect As Rectangle, drawExpanded As Boolean, compositeDesignerTheme As CompositeDesignerTheme)" />
<MemberSignature Language="F#" Value="static member DrawExpandButton : System.Drawing.Graphics * System.Drawing.Rectangle * bool * System.Workflow.ComponentModel.Design.CompositeDesignerTheme -> unit" Usage="System.Workflow.ComponentModel.Design.ActivityDesignerPaint.DrawExpandButton (graphics, boundingRect, drawExpanded, compositeDesignerTheme)" />
<MemberSignature Language="C++ CLI" Value="public:
 static void DrawExpandButton(System::Drawing::Graphics ^ graphics, System::Drawing::Rectangle boundingRect, bool drawExpanded, System::Workflow::ComponentModel::Design::CompositeDesignerTheme ^ compositeDesignerTheme);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Workflow.ComponentModel</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="graphics" Type="System.Drawing.Graphics" />
<Parameter Name="boundingRect" Type="System.Drawing.Rectangle" />
<Parameter Name="drawExpanded" Type="System.Boolean" />
<Parameter Name="compositeDesignerTheme" Type="System.Workflow.ComponentModel.Design.CompositeDesignerTheme" />
</Parameters>
<Docs>
<param name="graphics">The <see cref="T:System.Drawing.Graphics" /> on which to draw the button.</param>
<param name="boundingRect">The <see cref="T:System.Drawing.Rectangle" /> that defines the bounds of the button.</param>
<param name="drawExpanded">
<see langword="true" /> to draw an expanded button; otherwise, <see langword="false" />.</param>
<param name="compositeDesignerTheme">The <see cref="T:System.Workflow.ComponentModel.Design.CompositeDesignerTheme" /> associated with the activity designer used to render the button.</param>
<summary>Draws a button that is used to expand and collapse composite designers on the activity designer surface.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following example demonstrates a way to use the <xref:System.Workflow.ComponentModel.Design.ActivityDesignerPaint> class to draw a custom activity on the workflow design surface. A rounded rectangle is first drawn using the <xref:System.Workflow.ComponentModel.Design.ActivityDesignerPaint.DrawRoundedRectangle%2A> method. Text is then drawn using <xref:System.Workflow.ComponentModel.Design.ActivityDesignerPaint.DrawText%2A> and is placed at the location of the <xref:System.Workflow.ComponentModel.Design.ActivityDesigner.TextRectangle%2A> of the <xref:System.Workflow.ComponentModel.Design.ActivityDesigner>. Additionally, the <xref:System.Workflow.ComponentModel.Design.ActivityDesigner.Image%2A> associated with the <xref:System.Workflow.ComponentModel.Design.ActivityDesigner> is drawn using the <xref:System.Workflow.ComponentModel.Design.ActivityDesignerPaint.DrawImage%2A> method of the <xref:System.Workflow.ComponentModel.Design.ActivityDesignerPaint> class. Finally, an expand button used by a <xref:System.Workflow.ComponentModel.CompositeActivity> is drawn using the <xref:System.Workflow.ComponentModel.Design.ActivityDesignerPaint.DrawExpandButton%2A>.
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/wf_samples/cs/snippets.cs" id="Snippet78":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/wf_samples/vb/snippets.vb" id="Snippet78":::
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="graphics" /> or <paramref name="compositeDesignerTheme" /> contains a null reference (<see langword="Nothing" /> in Visual Basic).</exception>
</Docs>
</Member>
<MemberGroup MemberName="DrawImage">
<AssemblyInfo>
<AssemblyName>System.Workflow.ComponentModel</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Draws an image on the activity designer surface.</summary>
</Docs>
</MemberGroup>
<Member MemberName="DrawImage">
<MemberSignature Language="C#" Value="public static void DrawImage (System.Drawing.Graphics graphics, System.Drawing.Image image, System.Drawing.Rectangle destination, System.Workflow.ComponentModel.Design.DesignerContentAlignment alignment);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig void DrawImage(class System.Drawing.Graphics graphics, class System.Drawing.Image image, valuetype System.Drawing.Rectangle destination, valuetype System.Workflow.ComponentModel.Design.DesignerContentAlignment alignment) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Workflow.ComponentModel.Design.ActivityDesignerPaint.DrawImage(System.Drawing.Graphics,System.Drawing.Image,System.Drawing.Rectangle,System.Workflow.ComponentModel.Design.DesignerContentAlignment)" />
<MemberSignature Language="VB.NET" Value="Public Shared Sub DrawImage (graphics As Graphics, image As Image, destination As Rectangle, alignment As DesignerContentAlignment)" />
<MemberSignature Language="F#" Value="static member DrawImage : System.Drawing.Graphics * System.Drawing.Image * System.Drawing.Rectangle * System.Workflow.ComponentModel.Design.DesignerContentAlignment -> unit" Usage="System.Workflow.ComponentModel.Design.ActivityDesignerPaint.DrawImage (graphics, image, destination, alignment)" />
<MemberSignature Language="C++ CLI" Value="public:
 static void DrawImage(System::Drawing::Graphics ^ graphics, System::Drawing::Image ^ image, System::Drawing::Rectangle destination, System::Workflow::ComponentModel::Design::DesignerContentAlignment alignment);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Workflow.ComponentModel</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="graphics" Type="System.Drawing.Graphics" />
<Parameter Name="image" Type="System.Drawing.Image" />
<Parameter Name="destination" Type="System.Drawing.Rectangle" />
<Parameter Name="alignment" Type="System.Workflow.ComponentModel.Design.DesignerContentAlignment" />
</Parameters>
<Docs>
<param name="graphics">The <see cref="T:System.Drawing.Graphics" /> on which to draw the image.</param>
<param name="image">The <see cref="T:System.Drawing.Image" /> to draw.</param>
<param name="destination">The <see cref="T:System.Drawing.Rectangle" /> that defines the bounds of the image to draw.</param>
<param name="alignment">The <see cref="T:System.Workflow.ComponentModel.Design.DesignerContentAlignment" /> that specifies how the image is aligned in the bounding rectangle.</param>
<summary>Draws an image on the activity designer surface by using a <see cref="T:System.Drawing.Graphics" />, an <see cref="T:System.Drawing.Image" />, a <see cref="T:System.Drawing.Rectangle" />, and a <see cref="T:System.Workflow.ComponentModel.Design.DesignerContentAlignment" />.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
When you use this version of <xref:System.Workflow.ComponentModel.Design.ActivityDesignerPaint.DrawImage%2A>, the source rectangle is set to the size, in pixels, of the image, the transparency setting is set to 1.0f, and drawing grayscales is not allowed.
## Examples
The following example demonstrates a way to use the <xref:System.Workflow.ComponentModel.Design.ActivityDesignerPaint> class to draw a custom activity on the workflow design surface. A rounded rectangle is first drawn using the <xref:System.Workflow.ComponentModel.Design.ActivityDesignerPaint.DrawRoundedRectangle%2A> method. Text is then drawn using <xref:System.Workflow.ComponentModel.Design.ActivityDesignerPaint.DrawText%2A> and is placed at the location of the <xref:System.Workflow.ComponentModel.Design.ActivityDesigner.TextRectangle%2A> of the <xref:System.Workflow.ComponentModel.Design.ActivityDesigner>. Additionally, the <xref:System.Workflow.ComponentModel.Design.ActivityDesigner.Image%2A> associated with the <xref:System.Workflow.ComponentModel.Design.ActivityDesigner> is drawn using the <xref:System.Workflow.ComponentModel.Design.ActivityDesignerPaint.DrawImage%2A> method of the <xref:System.Workflow.ComponentModel.Design.ActivityDesignerPaint> class. Finally, an expand button used by a <xref:System.Workflow.ComponentModel.CompositeActivity> is drawn using the <xref:System.Workflow.ComponentModel.Design.ActivityDesignerPaint.DrawExpandButton%2A>.
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/wf_samples/cs/snippets.cs" id="Snippet78":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/wf_samples/vb/snippets.vb" id="Snippet78":::
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="graphics" />, <paramref name="image" />, or <paramref name="destination" /> contains a null reference (<see langword="Nothing" /> in Visual Basic).</exception>
</Docs>
</Member>
<Member MemberName="DrawImage">
<MemberSignature Language="C#" Value="public static void DrawImage (System.Drawing.Graphics graphics, System.Drawing.Image image, System.Drawing.Rectangle destination, System.Drawing.Rectangle source, System.Workflow.ComponentModel.Design.DesignerContentAlignment alignment, float transparency, bool grayscale);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig void DrawImage(class System.Drawing.Graphics graphics, class System.Drawing.Image image, valuetype System.Drawing.Rectangle destination, valuetype System.Drawing.Rectangle source, valuetype System.Workflow.ComponentModel.Design.DesignerContentAlignment alignment, float32 transparency, bool grayscale) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Workflow.ComponentModel.Design.ActivityDesignerPaint.DrawImage(System.Drawing.Graphics,System.Drawing.Image,System.Drawing.Rectangle,System.Drawing.Rectangle,System.Workflow.ComponentModel.Design.DesignerContentAlignment,System.Single,System.Boolean)" />
<MemberSignature Language="VB.NET" Value="Public Shared Sub DrawImage (graphics As Graphics, image As Image, destination As Rectangle, source As Rectangle, alignment As DesignerContentAlignment, transparency As Single, grayscale As Boolean)" />
<MemberSignature Language="F#" Value="static member DrawImage : System.Drawing.Graphics * System.Drawing.Image * System.Drawing.Rectangle * System.Drawing.Rectangle * System.Workflow.ComponentModel.Design.DesignerContentAlignment * single * bool -> unit" Usage="System.Workflow.ComponentModel.Design.ActivityDesignerPaint.DrawImage (graphics, image, destination, source, alignment, transparency, grayscale)" />
<MemberSignature Language="C++ CLI" Value="public:
 static void DrawImage(System::Drawing::Graphics ^ graphics, System::Drawing::Image ^ image, System::Drawing::Rectangle destination, System::Drawing::Rectangle source, System::Workflow::ComponentModel::Design::DesignerContentAlignment alignment, float transparency, bool grayscale);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Workflow.ComponentModel</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="graphics" Type="System.Drawing.Graphics" />
<Parameter Name="image" Type="System.Drawing.Image" />
<Parameter Name="destination" Type="System.Drawing.Rectangle" />
<Parameter Name="source" Type="System.Drawing.Rectangle" />
<Parameter Name="alignment" Type="System.Workflow.ComponentModel.Design.DesignerContentAlignment" />
<Parameter Name="transparency" Type="System.Single" />
<Parameter Name="grayscale" Type="System.Boolean" />
</Parameters>
<Docs>
<param name="graphics">The <see cref="T:System.Drawing.Graphics" /> on which to draw the image.</param>
<param name="image">The <see cref="T:System.Drawing.Image" /> to draw.</param>
<param name="destination">The <see cref="T:System.Drawing.Rectangle" /> that defines the bounds of the image.</param>
<param name="source">The <see cref="T:System.Drawing.Rectangle" /> that defines the source of the image.</param>
<param name="alignment">The <see cref="T:System.Workflow.ComponentModel.Design.DesignerContentAlignment" /> that specifies how the image is aligned in the bounding rectangle.</param>
<param name="transparency">A single-precision floating-point number that defines the transparency settings for the image.</param>
<param name="grayscale">
<see langword="true" /> to draw the image in grayscales; otherwise, <see langword="false" />.</param>
<summary>Draws an image on the activity designer surface by using a <see cref="T:System.Drawing.Graphics" />, an <see cref="T:System.Drawing.Image" />, a source and destination <see cref="T:System.Drawing.Rectangle" />, an <see cref="T:System.Workflow.ComponentModel.Design.DesignerContentAlignment" />, a single-precision floating-point number, and a Boolean value.</summary>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="graphics" />, <paramref name="image" />, <paramref name="destination" />, or <paramref name="source" /> contains a null reference (<see langword="Nothing" /> in Visual Basic).
-or-
<paramref name="transparency" /> is less than 0, or greater than 1.0f.</exception>
</Docs>
</Member>
<Member MemberName="DrawRoundedRectangle">
<MemberSignature Language="C#" Value="public static void DrawRoundedRectangle (System.Drawing.Graphics graphics, System.Drawing.Pen drawingPen, System.Drawing.Rectangle rectangle, int radius);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig void DrawRoundedRectangle(class System.Drawing.Graphics graphics, class System.Drawing.Pen drawingPen, valuetype System.Drawing.Rectangle rectangle, int32 radius) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Workflow.ComponentModel.Design.ActivityDesignerPaint.DrawRoundedRectangle(System.Drawing.Graphics,System.Drawing.Pen,System.Drawing.Rectangle,System.Int32)" />
<MemberSignature Language="VB.NET" Value="Public Shared Sub DrawRoundedRectangle (graphics As Graphics, drawingPen As Pen, rectangle As Rectangle, radius As Integer)" />
<MemberSignature Language="F#" Value="static member DrawRoundedRectangle : System.Drawing.Graphics * System.Drawing.Pen * System.Drawing.Rectangle * int -> unit" Usage="System.Workflow.ComponentModel.Design.ActivityDesignerPaint.DrawRoundedRectangle (graphics, drawingPen, rectangle, radius)" />
<MemberSignature Language="C++ CLI" Value="public:
 static void DrawRoundedRectangle(System::Drawing::Graphics ^ graphics, System::Drawing::Pen ^ drawingPen, System::Drawing::Rectangle rectangle, int radius);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Workflow.ComponentModel</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="graphics" Type="System.Drawing.Graphics" />
<Parameter Name="drawingPen" Type="System.Drawing.Pen" />
<Parameter Name="rectangle" Type="System.Drawing.Rectangle" />
<Parameter Name="radius" Type="System.Int32" />
</Parameters>
<Docs>
<param name="graphics">The <see cref="T:System.Drawing.Graphics" /> on which to draw the rectangle.</param>
<param name="drawingPen">The <see cref="T:System.Drawing.Pen" /> to draw the rectangle.</param>
<param name="rectangle">The <see cref="T:System.Drawing.Rectangle" /> that defines the bounds of the rounded rectangle.</param>
<param name="radius">The integer value of the radius to use for the rounded edges.</param>
<summary>Draws a rounded rectangle on the activity designer surface.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
<xref:System.Workflow.ComponentModel.Design.ActivityDesignerPaint.DrawRoundedRectangle%2A> uses the <xref:System.Workflow.ComponentModel.Design.ActivityDesignerPaint.GetRoundedRectanglePath%2A> method to obtain the path to draw.
## Examples
The following example demonstrates a way to use the <xref:System.Workflow.ComponentModel.Design.ActivityDesignerPaint> class to draw a custom activity on the workflow design surface. A rounded rectangle is first drawn using the <xref:System.Workflow.ComponentModel.Design.ActivityDesignerPaint.DrawRoundedRectangle%2A> method. Text is then drawn using <xref:System.Workflow.ComponentModel.Design.ActivityDesignerPaint.DrawText%2A> and is placed at the location of the <xref:System.Workflow.ComponentModel.Design.ActivityDesigner.TextRectangle%2A> of the <xref:System.Workflow.ComponentModel.Design.ActivityDesigner>. Additionally, the <xref:System.Workflow.ComponentModel.Design.ActivityDesigner.Image%2A> associated with the <xref:System.Workflow.ComponentModel.Design.ActivityDesigner> is drawn using the <xref:System.Workflow.ComponentModel.Design.ActivityDesignerPaint.DrawImage%2A> method of the <xref:System.Workflow.ComponentModel.Design.ActivityDesignerPaint> class. Finally, an expand button used by a <xref:System.Workflow.ComponentModel.CompositeActivity> is drawn using the <xref:System.Workflow.ComponentModel.Design.ActivityDesignerPaint.DrawExpandButton%2A>.
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/wf_samples/cs/snippets.cs" id="Snippet78":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/wf_samples/vb/snippets.vb" id="Snippet78":::
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="graphics" /> or <paramref name="drawingPen" /> contains a null reference (<see langword="Nothing" /> in Visual Basic).</exception>
</Docs>
</Member>
<Member MemberName="DrawText">
<MemberSignature Language="C#" Value="public static void DrawText (System.Drawing.Graphics graphics, System.Drawing.Font font, string text, System.Drawing.Rectangle boundingRect, System.Drawing.StringAlignment alignment, System.Workflow.ComponentModel.Design.TextQuality textQuality, System.Drawing.Brush textBrush);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig void DrawText(class System.Drawing.Graphics graphics, class System.Drawing.Font font, string text, valuetype System.Drawing.Rectangle boundingRect, valuetype System.Drawing.StringAlignment alignment, valuetype System.Workflow.ComponentModel.Design.TextQuality textQuality, class System.Drawing.Brush textBrush) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Workflow.ComponentModel.Design.ActivityDesignerPaint.DrawText(System.Drawing.Graphics,System.Drawing.Font,System.String,System.Drawing.Rectangle,System.Drawing.StringAlignment,System.Workflow.ComponentModel.Design.TextQuality,System.Drawing.Brush)" />
<MemberSignature Language="VB.NET" Value="Public Shared Sub DrawText (graphics As Graphics, font As Font, text As String, boundingRect As Rectangle, alignment As StringAlignment, textQuality As TextQuality, textBrush As Brush)" />
<MemberSignature Language="F#" Value="static member DrawText : System.Drawing.Graphics * System.Drawing.Font * string * System.Drawing.Rectangle * System.Drawing.StringAlignment * System.Workflow.ComponentModel.Design.TextQuality * System.Drawing.Brush -> unit" Usage="System.Workflow.ComponentModel.Design.ActivityDesignerPaint.DrawText (graphics, font, text, boundingRect, alignment, textQuality, textBrush)" />
<MemberSignature Language="C++ CLI" Value="public:
 static void DrawText(System::Drawing::Graphics ^ graphics, System::Drawing::Font ^ font, System::String ^ text, System::Drawing::Rectangle boundingRect, System::Drawing::StringAlignment alignment, System::Workflow::ComponentModel::Design::TextQuality textQuality, System::Drawing::Brush ^ textBrush);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Workflow.ComponentModel</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="graphics" Type="System.Drawing.Graphics" />
<Parameter Name="font" Type="System.Drawing.Font" />
<Parameter Name="text" Type="System.String" />
<Parameter Name="boundingRect" Type="System.Drawing.Rectangle" />
<Parameter Name="alignment" Type="System.Drawing.StringAlignment" />
<Parameter Name="textQuality" Type="System.Workflow.ComponentModel.Design.TextQuality" />
<Parameter Name="textBrush" Type="System.Drawing.Brush" />
</Parameters>
<Docs>
<param name="graphics">The <see cref="T:System.Drawing.Graphics" /> on which to draw the text.</param>
<param name="font">The <see cref="T:System.Drawing.Font" /> used to draw the text.</param>
<param name="text">The text to draw.</param>
<param name="boundingRect">The bounding <see cref="T:System.Drawing.Rectangle" /> in which the text must be drawn.</param>
<param name="alignment">The <see cref="T:System.Drawing.StringAlignment" /> that specifies where the text is aligned in the bounding rectangle.</param>
<param name="textQuality">The <see cref="T:System.Workflow.ComponentModel.Design.TextQuality" /> that specifies the quality setting to draw the text.</param>
<param name="textBrush">The <see cref="T:System.Drawing.Brush" /> to draw the text.</param>
<summary>Draws text on the activity designer surface.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following example demonstrates a way to use the <xref:System.Workflow.ComponentModel.Design.ActivityDesignerPaint> class to draw a custom activity on the workflow design surface. A rounded rectangle is first drawn using the <xref:System.Workflow.ComponentModel.Design.ActivityDesignerPaint.DrawRoundedRectangle%2A> method. Text is then drawn using <xref:System.Workflow.ComponentModel.Design.ActivityDesignerPaint.DrawText%2A> and is placed at the location of the <xref:System.Workflow.ComponentModel.Design.ActivityDesigner.TextRectangle%2A> of the <xref:System.Workflow.ComponentModel.Design.ActivityDesigner>. Additionally, the <xref:System.Workflow.ComponentModel.Design.ActivityDesigner.Image%2A> associated with the <xref:System.Workflow.ComponentModel.Design.ActivityDesigner> is drawn using the <xref:System.Workflow.ComponentModel.Design.ActivityDesignerPaint.DrawImage%2A> method of the <xref:System.Workflow.ComponentModel.Design.ActivityDesignerPaint> class. Finally, an expand button used by a <xref:System.Workflow.ComponentModel.CompositeActivity> is drawn using the <xref:System.Workflow.ComponentModel.Design.ActivityDesignerPaint.DrawExpandButton%2A>.
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/wf_samples/cs/snippets.cs" id="Snippet78":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/wf_samples/vb/snippets.vb" id="Snippet78":::
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="graphics" />, <paramref name="font" />, <paramref name="text" />, or <paramref name="textBrush" /> contains a null reference (<see langword="Nothing" /> in Visual Basic).</exception>
</Docs>
</Member>
<Member MemberName="GetRoundedRectanglePath">
<MemberSignature Language="C#" Value="public static System.Drawing.Drawing2D.GraphicsPath GetRoundedRectanglePath (System.Drawing.Rectangle rectangle, int radius);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Drawing.Drawing2D.GraphicsPath GetRoundedRectanglePath(valuetype System.Drawing.Rectangle rectangle, int32 radius) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Workflow.ComponentModel.Design.ActivityDesignerPaint.GetRoundedRectanglePath(System.Drawing.Rectangle,System.Int32)" />
<MemberSignature Language="VB.NET" Value="Public Shared Function GetRoundedRectanglePath (rectangle As Rectangle, radius As Integer) As GraphicsPath" />
<MemberSignature Language="F#" Value="static member GetRoundedRectanglePath : System.Drawing.Rectangle * int -> System.Drawing.Drawing2D.GraphicsPath" Usage="System.Workflow.ComponentModel.Design.ActivityDesignerPaint.GetRoundedRectanglePath (rectangle, radius)" />
<MemberSignature Language="C++ CLI" Value="public:
 static System::Drawing::Drawing2D::GraphicsPath ^ GetRoundedRectanglePath(System::Drawing::Rectangle rectangle, int radius);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Workflow.ComponentModel</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Drawing.Drawing2D.GraphicsPath</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="rectangle" Type="System.Drawing.Rectangle" />
<Parameter Name="radius" Type="System.Int32" />
</Parameters>
<Docs>
<param name="rectangle">The <see cref="T:System.Drawing.Rectangle" /> for which to obtain the graphics path.</param>
<param name="radius">An integer that defines the radius to use to draw the rounded corners.</param>
<summary>Returns the graphics path used to draw the specified rounded rectangle.</summary>
<returns>A <see cref="T:System.Drawing.Drawing2D.GraphicsPath" /> that draws the rounded path of the specified rectangle.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Workflow.ComponentModel.Design.ActivityDesignerPaint.DrawRoundedRectangle%2A> method uses <xref:System.Workflow.ComponentModel.Design.ActivityDesignerPaint.GetRoundedRectanglePath%2A> to obtain the path to draw.
]]></format>
</remarks>
<exception cref="T:System.ArgumentException">
<paramref name="rectangle" /> is set to <see cref="P:System.Drawing.Rectangle.IsEmpty" />.
-or-
<paramref name="radius" /> is less than or equal to 0.</exception>
</Docs>
</Member>
</Members>
</Type>