Class CustomSnippetDrawEventArgs
Provides data for the OnCustomDraw event of the Format.
Inheritance
Namespace: Syncfusion.Windows.Forms.Edit
Assembly: Syncfusion.Edit.Windows.dll
Syntax
public class CustomSnippetDrawEventArgs : PaintEventArgs
Constructors
CustomSnippetDrawEventArgs(Graphics, Rectangle, ISnippetFormat, String, Boolean)
Initializes a new instance of the CustomSnippetDrawEventArgs class.
Declaration
public CustomSnippetDrawEventArgs(Graphics g, Rectangle rc, ISnippetFormat format, string text, bool measure)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Graphics | g | Graphics object used for rendering |
System.Drawing.Rectangle | rc | Destination rectangle |
ISnippetFormat | format | Default Format used for rendering |
System.String | text | Text which must be rendered |
System.Boolean | measure | A flag that specifies whether the user has to Draw text or just Measure. Measuring is not needed if drawing is performed. |
CustomSnippetDrawEventArgs(PaintEventArgs, ISnippetFormat, String, Boolean)
Initializes a new instance of the CustomSnippetDrawEventArgs class.
Declaration
public CustomSnippetDrawEventArgs(PaintEventArgs args, ISnippetFormat format, string text, bool measure)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.PaintEventArgs | args | The System.Windows.Forms.PaintEventArgs instance containing the event data. |
ISnippetFormat | format | Default Format used for rendering |
System.String | text | Text which must be rendered |
System.Boolean | measure | A flag that specifies whether the user has to Draw text or just Measure. Measuring is not needed if drawing is performed. |
Properties
Format
Gets or sets format which will be used by default renderer. This format can be changed by user to influence the default renderer.
Declaration
public ISnippetFormat Format { get; set; }
Property Value
Type |
---|
ISnippetFormat |
Measure
Gets a value indicating whether the user must draw text or just measure it. Measuring is not needed if drawing is performed.
Declaration
public bool Measure { get; }
Property Value
Type |
---|
System.Boolean |
MeasuringResult
Gets or sets result of measuring text.
Declaration
public TextInfo MeasuringResult { get; set; }
Property Value
Type |
---|
TextInfo |
SkipDefaultDrawing
Gets or sets a value indicating whether user wishes to do his own drawing. If set to false, default renderer will step on user work.
Declaration
public bool SkipDefaultDrawing { get; set; }
Property Value
Type |
---|
System.Boolean |
Text
Gets or sets the text which will be sent to the renderer.
Declaration
public string Text { get; set; }
Property Value
Type |
---|
System.String |