WPF

Code Examples Upgrade Guide User Guide Demos Support Forums Download
  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class ButtonPaint

    Show / Hide Table of Contents

    Class ButtonPaint

    Paints a button control in the grid cells.

    Inheritance
    System.Object
    ButtonPaint
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Syncfusion.Windows.Controls.Grid
    Assembly: Syncfusion.Grid.Wpf.dll
    Syntax
    public class ButtonPaint

    Constructors

    ButtonPaint()

    Default constructor.

    Declaration
    public ButtonPaint()

    Properties

    Margin

    Gets or sets the button margins.

    Declaration
    public Thickness Margin { get; set; }
    Property Value
    Type Description
    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 Description
    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.

    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved