avalonia-services

Access Avalonia platform services via TopLevel for clipboard, dialogs, and launching.

27|2|Updated Apr 23, 2026
One-click install
npx skills add https://github.com/linuxdevel/Avalonia-skills --skill avalonia-services
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: avalonia-services
Source: https://github.com/linuxdevel/Avalonia-skills/tree/main/skills/avalonia/avalonia-services
Command: npx skills add https://github.com/linuxdevel/Avalonia-skills --skill avalonia-services

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Avalonia applications often require access to platform services (clipboard, file dialogs, launching, screen information, focus management, and in-app notifications). This skill centralizes and standardizes that access via TopLevel, ensuring consistent usage across windows and controls.

Core Features & Use Cases

  • Access clipboard read/write via TopLevel.
  • Open and save files or folders through StorageProvider dialogs and well-known folders.
  • Launch URLs or files using Launcher and in-app notifications via WindowNotificationManager.
  • Retrieve screen/work area, window position, and focus management data for responsive UI.
  • IME input method access for advanced text input scenarios.

Quick Start

Demonstrate a typical flow by opening a file dialog, copying the resulting path to the clipboard, and launching the selected file URL.

Frequently Asked Questions about avalonia-services

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I access the clipboard in an Avalonia desktop application?

Access the clipboard in Avalonia by retrieving the active TopLevel using TopLevel.GetTopLevel(this) and calling its Clipboard property. This provides standardized read and write capabilities across multiple windows and controls.

What is the best way to open file dialogs in Avalonia across multiple windows?

The best way to open file dialogs in Avalonia is via the StorageProvider accessed through the TopLevel. It standardizes file picker interactions for opening and saving files or folders consistently across different windows.

How do I launch URLs or files from an Avalonia UI?

Launch URLs or files from an Avalonia UI using the Launcher platform service exposed by the TopLevel. This ensures reliable external application launching for selected links or local file paths.

Can I show in-app notifications using Avalonia platform services?

Yes, you can show in-app notifications using the WindowNotificationManager exposed via the TopLevel. This provides consistent UI feedback mechanisms for desktop applications requiring user alerts.

Does this Avalonia platform service access method support IME input method scenarios?

Yes, accessing platform services via TopLevel supports IME input method scenarios through the InputMethod property. It enables advanced text input handling alongside focus management and screen data retrieval.

Why use TopLevel to retrieve Avalonia platform services instead of direct window references?

Using TopLevel.GetTopLevel(this) centralizes access to Avalonia platform services like StorageProvider and FocusManager, ensuring consistent usage patterns across various controls and windows without relying on direct window references.