menu

MAUI

  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class LegendItem - MAUI API Reference | Syncfusion

    Show / Hide Table of Contents

    Class LegendItem

    Inheritance
    System.Object
    LegendItem
    Implements
    System.ComponentModel.INotifyPropertyChanged
    ILegendItem
    Namespace: Syncfusion.Maui.Core
    Assembly: Syncfusion.Maui.Core.dll
    Syntax
    public class LegendItem : Object, INotifyPropertyChanged, ILegendItem

    Constructors

    LegendItem()

    Initializes a new instance of the LegendItem class.

    Declaration
    public LegendItem()

    Properties

    FontAttributes

    Gets or sets the font attribute type for the legend item label.

    Declaration
    public FontAttributes FontAttributes { get; }
    Property Value
    Type
    Microsoft.Maui.Controls.FontAttributes

    FontFamily

    Gets or sets the font family name for the legend item label.

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

    FontSize

    Gets or sets the font size for the legend label text.

    Declaration
    public float FontSize { get; }
    Property Value
    Type
    System.Single

    IconBrush

    Gets or sets the corresponding icon color for legend item.

    Declaration
    public Brush IconBrush { get; set; }
    Property Value
    Type
    Microsoft.Maui.Controls.Brush

    IconHeight

    Gets or sets the height of the legend icon.

    Declaration
    public double IconHeight { get; set; }
    Property Value
    Type Description
    System.Double

    This property takes double value.

    IconType

    Gets or sets the icon type in legend.

    Declaration
    public ShapeType IconType { get; }
    Property Value
    Type
    ShapeType

    IconWidth

    Gets or sets the width of the legend icon.

    Declaration
    public double IconWidth { get; set; }
    Property Value
    Type Description
    System.Double

    This property takes double value.

    Index

    Gets the corresponding index for legend item.

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

    IsIconVisible

    Gets or sets a value indicating whether to display the legend icon.

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

    IsToggled

    Gets or sets a value indicating whether the legend item is toggled or not.

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

    Item

    Gets the corresponding data point for series.

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

    Source

    Gets the origin of the legend item.

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

    Text

    Gets or sets the corresponding label for legend item.

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

    TextColor

    Gets or sets the corresponding text color for legend item.

    Declaration
    public Color TextColor { get; }
    Property Value
    Type
    Microsoft.Maui.Graphics.Color

    TextMargin

    Gets or sets the margin of the legend text.

    Declaration
    public Thickness TextMargin { get; }
    Property Value
    Type
    Microsoft.Maui.Thickness

    Events

    PropertyChanged

    Occurs when a property value changes.

    Declaration
    public event PropertyChangedEventHandler PropertyChanged
    Event Type
    Type
    System.ComponentModel.PropertyChangedEventHandler

    Explicit Interface Implementations

    ILegendItem.DisableBrush

    Declaration
    Brush ILegendItem.DisableBrush { get; set; }
    Returns
    Type
    Microsoft.Maui.Controls.Brush

    ILegendItem.FontAttributes

    Declaration
    FontAttributes ILegendItem.FontAttributes { get; set; }
    Returns
    Type
    Microsoft.Maui.Controls.FontAttributes

    ILegendItem.FontFamily

    Declaration
    string ILegendItem.FontFamily { get; set; }
    Returns
    Type
    System.String

    ILegendItem.FontSize

    Declaration
    float ILegendItem.FontSize { get; set; }
    Returns
    Type
    System.Single

    ILegendItem.IconType

    Declaration
    ShapeType ILegendItem.IconType { get; set; }
    Returns
    Type
    ShapeType

    ILegendItem.TextColor

    Declaration
    Color ILegendItem.TextColor { get; set; }
    Returns
    Type
    Microsoft.Maui.Graphics.Color

    ILegendItem.TextMargin

    Declaration
    Thickness ILegendItem.TextMargin { get; set; }
    Returns
    Type
    Microsoft.Maui.Thickness

    Implements

    System.ComponentModel.INotifyPropertyChanged
    ILegendItem
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved