Avalonia UI API Documentation

website·Indexed 35 days ago

https://api-docs.avaloniaui.net

Technical API reference for Avalonia UI, covering namespaces such as Avalonia.Controls, Avalonia.Media, Avalonia.Input, and Avalonia.Markup. Includes detailed definitions for controls like TreeView, SplitButton, and VirtualizingStackPanel, as well as media geometries, XAML markup extensions, and windowing base classes.

Tokens
1.9M
Snippets
16.3K
Records
21.6K
Agent score
59%

What's inside Avalonia UI

  1. Overview of Avalonia.Controls.DataGridColumn

    The DataGridColumn class is an abstract base class in the Avalonia.Controls namespace (contained in the Avalonia.Controls.DataGrid.dll assembly). It provides the core functionality for columns within a DataGrid. Common derived classes include DataGridBoundColumn and DataGridTemplateColumn.
    public abstract class DataGridColumn : AvaloniaObject
  2. Overview of Avalonia.StyledElement

    The StyledElement class extends Animatable and serves as a base class for elements that require styling capabilities, data context inheritance, and participation in the logical tree. It implements several key interfaces including IStyleable for styling, ILogical for logical tree structure, and IResourceHost for resource management.
    public class StyledElement : Animatable, 
        IDataContextProvider, ILogical, IThemeVariantHost, IResourceHost, IResourceNode, 
        IStyleHost, ISetLogicalParent, ISetInheritanceParent, ISupportInitialize, INamed, 
        IStyleable
  3. Overview of Avalonia.RoundedRect

    The RoundedRect struct in the Avalonia namespace (Assembly: Avalonia.Base.dll) represents a rectangle with rounded corners. It inherits from ValueType and is used to define bounds with specific corner radii.
    public struct RoundedRect
  4. Use the ColorSlider control in Avalonia

    The ColorSlider is a specialized Slider located in the Avalonia.Controls.Primitives namespace (Assembly: Avalonia.Controls.ColorPicker.dll). It is designed to represent a single color component via a slider with a background that visually reflects the color component being adjusted. It inherits from Slider and RangeBase, meaning it supports all standard slider functionality for numeric range input.
    using Avalonia.Controls.Primitives;
    
    // Example instantiation
    var colorSlider = new ColorSlider();
  5. GestureRecognizer abstract class overview

    The GestureRecognizer is an abstract base class in the Avalonia.Input.GestureRecognizers namespace (contained in the Avalonia.Base assembly). It inherits from StyledElement and serves as the foundation for implementing gesture recognition logic in Avalonia UI. Common derived implementations include ScrollGestureRecognizer, PinchGestureRecognizer, and PullGestureRecognizer.
    public abstract class GestureRecognizer : StyledElement
  6. Use SliderAutomationPeer to provide automation accessibility for Sliders

    The SliderAutomationPeer class in the Avalonia.Controls.Automation.Peers namespace is used to provide automation accessibility for Slider controls. It inherits functionality from RangeBaseAutomationPeer, ControlAutomationPeer, and AutomationPeer, allowing it to interact with automation clients to report property changes, manage focus, and handle range-based values.
  7. Use the Underline element for underlined text

    The Underline element in the Avalonia.Controls.Documents namespace is a markup helper used to indicate underlined content. It is functionally equivalent to using a Span with the TextDecorations property set to TextDecorations.Underlined. It can contain other inline elements.
    public sealed class Underline : Span
  8. Use the IStorageItem interface for storage item manipulation

    The IStorageItem interface in the Avalonia.Platform.Storage namespace is used to manipulate storage items (files and folders) and their contents, and to retrieve information about them. Because it inherits from IDisposable, it is recommended to dispose of IStorageItem instances when they are no longer needed.

    Important Implementation Note: This interface is marked with [NotClientImplementableAttribute]. It is not intended to be implemented by clients unless PrivateApi is enabled.

    using Avalonia.Platform.Storage;
    
    // IStorageItem is used to represent a file or folder
    public interface IStorageItem : IDisposable
    {
        // Interface members
    }
  9. Use the PathIcon control in Avalonia

    The PathIcon class, located in the Avalonia.Controls namespace within the Avalonia.Controls.dll assembly, is used to render vector icons based on path data. It inherits from IconElement, which in turn inherits from TemplatedControl and Control.
    public class PathIcon : IconElement