Skip to content

Button class

Defined in

Namespace: CrissCross.Avalonia.UI.Controls Assembly: CrissCross.Avalonia.UI.dll Full name: CrissCross.Avalonia.UI.Controls.Button Modifiers: public

Summary

        Represents a button control that can display an icon and supports customizable appearance, including visual states
        for mouse over and pressed interactions.
        

Applies to

net10.0, net10.0-browserwasm1.0, net10.0-desktop1.0, net9.0, net9.0-browserwasm1.0, net9.0-desktop1.0, net8.0, net8.0-ios17.5, net8.0-maccatalyst17.5, net8.0-macos14.2, net8.0-macos14.5, net8.0-tvos17.2, netstandard2.1, net471

Class hierarchy
classDiagram
class Button
class Button
Button <|-- Button
class IAppearanceControl {
    <>
}
IAppearanceControl <|.. Button
class IIconControl {
    <>
}
IIconControl <|.. Button

Inherits from: Button

Implements: IAppearanceControl, IIconControl

Remarks

The Button control extends the standard Avalonia button by providing additional properties for appearance customization, such as icon support, corner radius, and brushes for different visual states. It implements IAppearanceControl and IIconControl, allowing integration with appearance and icon-related features in Avalonia applications.

Constructors

NameSummary
.ctor

Properties

NameSummary
IconGets or sets displayed [IconElement](#
AppearanceGets or sets the [Appearance](# of the control, if available.
MouseOverBackgroundGets or sets background brush when the user interacts with an element with a pointing device.
MouseOverBorderBrushGets or sets border brush when the user interacts with an element with a pointing device.
MouseOverForegroundGets or sets foreground brush when the user interacts with an element with a pointing device.
PressedForegroundGets or sets foreground when pressed.
PressedBackgroundGets or sets background brush when the user clicks the button.
PressedBorderBrushGets or sets border brush when the user clicks the button.
CornerRadiusGets or sets a value that represents the degree to which the corners are rounded.

Fields

NameSummary
static IconPropertyProperty for [Icon](#
static AppearancePropertyProperty for [Appearance](#
static MouseOverBackgroundPropertyProperty for [MouseOverBackground](#
static MouseOverBorderBrushPropertyProperty for [MouseOverBorderBrush](#
static MouseOverForegroundPropertyProperty for [MouseOverForeground](#
static PressedForegroundPropertyProperty for [PressedForeground](#
static PressedBackgroundPropertyProperty for [PressedBackground](#
static PressedBorderBrushPropertyProperty for [PressedBorderBrush](#
static CornerRadiusPropertyProperty for [CornerRadius](#

Derived types

Inherited members