csharpc-sharpdotnetxamlavaloniauicross-platformcross-platform-xamlavaloniaguimulti-platformuser-interfacedotnetcore
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
1.2 KiB
41 lines
1.2 KiB
using System.Collections.Generic;
|
|
using Avalonia.Input;
|
|
|
|
#nullable enable
|
|
|
|
namespace Avalonia.Controls
|
|
{
|
|
/// <summary>
|
|
/// Represents an <see cref="IMenu"/> or <see cref="IMenuItem"/>.
|
|
/// </summary>
|
|
public interface IMenuElement : IControl
|
|
{
|
|
/// <summary>
|
|
/// Gets or sets the currently selected submenu item.
|
|
/// </summary>
|
|
IMenuItem? SelectedItem { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets the submenu items.
|
|
/// </summary>
|
|
IEnumerable<IMenuItem> SubItems { get; }
|
|
|
|
/// <summary>
|
|
/// Opens the menu or menu item.
|
|
/// </summary>
|
|
void Open();
|
|
|
|
/// <summary>
|
|
/// Closes the menu or menu item.
|
|
/// </summary>
|
|
void Close();
|
|
|
|
/// <summary>
|
|
/// Moves the submenu selection in the specified direction.
|
|
/// </summary>
|
|
/// <param name="direction">The direction.</param>
|
|
/// <param name="wrap">Whether to wrap after the first or last item.</param>
|
|
/// <returns>True if the selection was moved; otherwise false.</returns>
|
|
bool MoveSelection(NavigationDirection direction, bool wrap);
|
|
}
|
|
}
|
|
|