menu

Blazor

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

    Show / Hide Table of Contents

    Class ListItem

    Gets or sets the list of list items.

    Inheritance
    System.Object
    ListItem
    Namespace: Syncfusion.Blazor.SfPdfViewer
    Assembly: Syncfusion.Blazor.SfPdfViewer.dll
    Syntax
    public class ListItem : Object
    Remarks

    This property holds a collection of ListItem objects, where each item contains a Name and a Value. By default, the collection is initialized as an empty list. This allows you to define multiple options with corresponding values.

    Examples
    List<ListItem> options = new List<ListItem>
    {
        new ListItem { Name = "Option 1", Value = "Value 1" },
        new ListItem { Name = "Option 2", Value = "Value 2" }
    };

    Constructors

    ListItem()

    Declaration
    public ListItem()

    Properties

    Name

    Gets or sets the display text associated with the list item.

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

    A System.String representing the text displayed to users.

    Remarks

    The Name property holds the user-friendly text that appears in the UI. This property is used to display readable options to users in dropdowns, list boxes, etc.

    Examples
    List<ListItem> options = new List<ListItem>
    {
        new ListItem { Name = "Option 1", Value = "Value 1" },
        new ListItem { Name = "Option 2", Value = "Value 2" }
    };

    Value

    Gets or sets the export value for the list item.

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

    A System.String representing the exported value of the list item.

    Remarks

    The Value property stores the corresponding data value for the list item. This value is often used in form submissions, data binding, or exporting selected items.

    Examples
    List<ListItem> options = new List<ListItem>
    {
        new ListItem { Name = "Option 1", Value = "Value 1" },
        new ListItem { Name = "Option 2", Value = "Value 2" }
    };
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved