Class ButtonPaint
Paints a button control in the grid cells.
Inheritance
System.Object
ButtonPaint
Namespace: Syncfusion.Windows.Controls.Grid
Assembly: Syncfusion.Grid.Wpf.dll
Syntax
public class ButtonPaint : Object
Constructors
ButtonPaint()
Default constructor.
Declaration
public ButtonPaint()
Properties
Margin
Gets or sets the button margins.
Declaration
public Thickness Margin { get; set; }
Property Value
Type |
---|
System.Windows.Thickness |
Methods
DrawButton(DrawingContext, Rect, String, GridStyleInfo)
Draws the button in the cell rectangle.
Declaration
public Thickness DrawButton(DrawingContext dc, Rect rc, string text, GridStyleInfo style)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Media.DrawingContext | dc | The drawing context. |
System.Windows.Rect | rc | Cell rectangle. |
System.String | text | Text to be drawn over the button. |
GridStyleInfo | style | Cell style information. |
Returns
Type | Description |
---|---|
System.Windows.Thickness | Cell margins. |
GetButtonVisualStyle(Button, GridStyleInfo)
Returns the button VisualStyle.
Declaration
public Button GetButtonVisualStyle(Button button, GridStyleInfo style)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Controls.Button | button | |
GridStyleInfo | style |
Returns
Type |
---|
System.Windows.Controls.Button |
SubtractBorderMargins(Rect, Thickness)
Removes border margins to get cells client area.
Declaration
public Rect SubtractBorderMargins(Rect cellRect, Thickness mi)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Rect | cellRect | Cell rectangle. |
System.Windows.Thickness | mi | The border margins. |
Returns
Type | Description |
---|---|
System.Windows.Rect | Returns the cells client area. |