Avalonia ListBoxItem Control (Avalonia.Controls/ListBoxItem.cs)

Avalonia · src/Avalonia.Controls/ListBoxItem.cs · csharp · MIT
ui, tag:desktop, tag:avalonia, tag:controls

Defines a selectable item container control for ListBox elements in Avalonia UI. Reuse when building desktop user interfaces.

// Source: https://github.com/AvaloniaUI/Avalonia | License: MIT
// Provided via justclaw.it.com; keep this notice with the code.
using Avalonia.Automation;
using Avalonia.Automation.Peers;
using Avalonia.Controls.Metadata;
using Avalonia.Controls.Mixins;
using Avalonia.Controls.Platform;
using Avalonia.Controls.Primitives;
using Avalonia.Input;
using Avalonia.Interactivity;

namespace Avalonia.Controls
{
    /// <summary>
    /// A selectable item in a <see cref="ListBox"/>.
    /// </summary>
    [PseudoClasses(":pressed", ":selected")]
    public class ListBoxItem : ContentControl, ISelectable
    {
        /// <summary>
        /// Defines the <see cref="IsSelected"/> property.
        /// </summary>
        public static readonly StyledProperty<bool> IsSelectedProperty =
            S

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key