DevToys logo DevToys
  • Home
  • Blog
  • Documentation
  • Download
Search Results for

    Show / Hide Table of Contents

    Interface IUIButton

    A component that represents a button, which reacts when clicking on it.

    Inherited Members
    IUIElement.Id
    IUIElement.IsVisible
    IUIElement.IsEnabled
    IUIElement.HorizontalAlignment
    IUIElement.VerticalAlignment
    IUIElement.IsVisibleChanged
    IUIElement.IsEnabledChanged
    IUIElement.HorizontalAlignmentChanged
    IUIElement.VerticalAlignmentChanged
    Namespace: DevToys.Api
    Assembly: DevToys.Api.dll
    Syntax
    public interface IUIButton : IUIElement

    Properties

    IconFontName

    Gets the name of the font containing the icon.

    Declaration
    string? IconFontName { get; }
    Property Value
    Type Description
    string

    IconGlyph

    Gets the glyph corresponding to the icon in the IconFontName.

    Declaration
    char IconGlyph { get; }
    Property Value
    Type Description
    char

    IsAccent

    Gets whether the button appearance should be accented.

    Declaration
    bool IsAccent { get; }
    Property Value
    Type Description
    bool

    IsHyperlink

    Gets whether the button appearance should be a hyperlink.

    Declaration
    bool IsHyperlink { get; }
    Property Value
    Type Description
    bool

    OnClickAction

    Gets the action to run when the user clicks the button.

    Declaration
    Func<ValueTask>? OnClickAction { get; }
    Property Value
    Type Description
    Func<ValueTask>

    Text

    Gets the text to display in the button.

    Declaration
    string? Text { get; }
    Property Value
    Type Description
    string

    Events

    IconFontNameChanged

    Raised when IconFontName is changed.

    Declaration
    event EventHandler? IconFontNameChanged
    Event Type
    Type Description
    EventHandler

    IconGlyphChanged

    Raised when IconGlyph is changed.

    Declaration
    event EventHandler? IconGlyphChanged
    Event Type
    Type Description
    EventHandler

    IsAccentChanged

    Raised when IsAccent is changed.

    Declaration
    event EventHandler? IsAccentChanged
    Event Type
    Type Description
    EventHandler

    TextChanged

    Raised when Text is changed.

    Declaration
    event EventHandler? TextChanged
    Event Type
    Type Description
    EventHandler

    Extension Methods

    GUI.AccentAppearance(IUIButton)
    GUI.AlignHorizontally<T>(T, UIHorizontalAlignment)
    GUI.AlignVertically<T>(T, UIVerticalAlignment)
    GUI.Disable<T>(T)
    GUI.Enable<T>(T)
    GUI.Hide<T>(T)
    GUI.HyperlinkAppearance(IUIButton)
    GUI.Icon(IUIButton, string, char)
    GUI.NeutralAppearance(IUIButton)
    GUI.OnClick(IUIButton, Action?)
    GUI.OnClick(IUIButton, Func<ValueTask>?)
    GUI.Show<T>(T)
    GUI.Text(IUIButton, string?)
    LoggingExtensions.Log<T>(T)
    In this article
    DevToys logo © 2024 DevToys