StaX.Domain
is a core library built on Avalonia and Fluent Avalonia, designed for plugin development and integration within the StaX application. It provides essential abstractions and a flexible architecture that allows developers to create custom plugins for the StaX platform.
- Plugin Development Support:
StaX.Domain
provides a base classUiState
, allowing developers to build plugins that can be easily integrated into the main StaX application. - Modular Architecture: Each plugin is developed independently and can be placed in the
Plugins
folder of the StaX application for dynamic loading. - Flexible UI Design: Plugins can fully control their UI, making them adaptable to various use cases.
You can install the StaX.Domain
NuGet package using the .NET CLI or the NuGet Package Manager in Visual Studio.
dotnet add package StaX.Domain
Install-Package StaX.Domain
To create a plugin for the StaX application, follow these steps:
- Install the
StaX.Domain
package in your project. - Create a class that inherits from
UiState
, which defines the UI and behavior of your plugin.
Here is a simple example:
using Avalonia.Markup.Xaml;
using FluentAvalonia.UI.Controls;
using MyStaxPlugin.ViewModels;
using MyStaxPlugin.Views;
using StaX.Domain;
namespace MyStaxPlugin;
public partial class MyState : UiState
{
public override string StateName { get; protected set; } = "MyStaxPlugin";
public override string ToolTip { get; protected set; } = "MyStaxPlugin";
public override Symbol? Icon { get; protected set; } = Symbol.ShareAndroid;
public MyState()
{
StateView = new MyView();
StateViewModel = new MyViewModel();
}
public override void Initialize() => AvaloniaXamlLoader.Load(this);
}
- Assemble your project to create a
.dll
file. - Copy the created
.dll
file in the folder with the name of your plugin to thePlugins
folder of the StaX application. The plugin will be loaded automatically when you start StaX.
Contributions are welcome! If you'd like to help improve StaX.Domain
or add features, feel free to fork the repository and submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for more details.