menu

WinForms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class DrawItemEventArgs - WindowsForms API Reference | Syncfusion

    Show / Hide Table of Contents

    Class DrawItemEventArgs

    Provides data about the DrawItem event.

    Inheritance
    System.Object
    System.EventArgs
    DrawItemEventArgs
    Inherited Members
    System.EventArgs.Empty
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Syncfusion.WinForms.ListView.Events
    Assembly: Syncfusion.SfListView.WinForms.dll
    Syntax
    public class DrawItemEventArgs : EventArgs

    Constructors

    DrawItemEventArgs(Graphics, Rectangle, String, Object, Object, ItemType, Int32, ListViewItemStyleInfo, Image, ContentAlignment, TextImageRelation, Boolean)

    Initializes a new instance of the DrawItemEventArgs class.

    Declaration
    public DrawItemEventArgs(Graphics graphics, Rectangle bounds, string text, object value, object itemData, ItemType itemType, int itemIndex, ListViewItemStyleInfo style, Image image, ContentAlignment imageAlignment, TextImageRelation textImageRelation, bool handle)
    Parameters
    Type Name Description
    System.Drawing.Graphics graphics

    The graphics context.

    System.Drawing.Rectangle bounds

    The item rectangle bounds.

    System.String text

    The text value used to draw the cell

    System.Object value

    The item value.

    System.Object itemData

    The data object of an item which is bound with listview.

    ItemType itemType

    The type of an item.

    System.Int32 itemIndex

    An item index.

    ListViewItemStyleInfo style

    A ListViewItemStyleInfo used to draw the items.

    System.Drawing.Image image

    An item image.

    System.Drawing.ContentAlignment imageAlignment

    An item image alignement.

    System.Windows.Forms.TextImageRelation textImageRelation

    An item tect and image relation.

    System.Boolean handle

    Handle to determine whether customization should be applied.

    Properties

    Bounds

    Gets the bounds of an item rectangle.

    Declaration
    public Rectangle Bounds { get; }
    Property Value
    Type
    System.Drawing.Rectangle

    Graphics

    Gets the Graphics context of SfListView.

    Declaration
    public Graphics Graphics { get; }
    Property Value
    Type
    System.Drawing.Graphics

    Handled

    Gets or sets a value indicating whether the drawing of an cell is handled or not.

    Declaration
    public bool Handled { get; set; }
    Property Value
    Type
    System.Boolean

    Image

    Gets or sets an image for an item.

    Declaration
    public Image Image { get; set; }
    Property Value
    Type
    System.Drawing.Image

    ImageAlignment

    Gets or sets the alignment for image.

    Declaration
    public ContentAlignment ImageAlignment { get; set; }
    Property Value
    Type
    System.Drawing.ContentAlignment

    ItemData

    Gets the underlying data object of an item.

    Declaration
    public object ItemData { get; }
    Property Value
    Type
    System.Object

    ItemIndex

    Gets an index of an item.

    Declaration
    public int ItemIndex { get; }
    Property Value
    Type
    System.Int32

    ItemType

    Gets the type of an item.

    Declaration
    public ItemType ItemType { get; }
    Property Value
    Type
    ItemType

    Style

    Gets the style of an item.

    Declaration
    public ListViewItemStyleInfo Style { get; }
    Property Value
    Type
    ListViewItemStyleInfo

    Text

    Gets or sets the display text of an item. It returns the value of DisplayMember.

    Declaration
    public string Text { get; set; }
    Property Value
    Type
    System.String

    TextImageRelation

    Gets or sets the image and text relation.

    Declaration
    public TextImageRelation TextImageRelation { get; set; }
    Property Value
    Type
    System.Windows.Forms.TextImageRelation

    Value

    Gets the value of an item. It returns the value of ValueMember.

    Declaration
    public object Value { get; }
    Property Value
    Type
    System.Object
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved