StaX is an application built on Avalonia and Fluent Avalonia, designed to load and display plugins with various functionalities. The application utilizes the StaX.Domain
NuGet library, allowing you to easily extend its capabilities by developing your own plugins.
- Plugin Loading: You can add plugins to the application by simply placing them in the
Plugins
folder. StaX will automatically detect and display them. - Flexibility: Plugins are implemented as descendants of the
UiState
class from theStaX.Domain
library. This allows you to develop plugins with any functionality and seamlessly integrate them into the main application. - Modern UI: The app leverages Avalonia and Fluent Avalonia, providing a modern and user-friendly interface.
Main window of the application:
To run StaX, you will need:
- .NET 8 or higher
- StaX.Domain NuGet package
-
Clone the repository:
git clone https://github.com/Psynapsis/StaX.git
-
Navigate to the project directory and restore dependencies:
cd StaX dotnet restore
-
Build and run the application:
dotnet build dotnet run
To add a plugin to StaX, follow these steps:
- Create a new project or library that uses the
StaX.Domain
package. - Implement your plugin by creating a class that inherits from
StaX.Domain.UiState
. - Build the plugin as a DLL.
- Place the compiled plugin folder in the
Plugins
folder next to the main StaX application. - StaX will automatically load and display the plugin the next time it runs.
Here’s an example of a simple plugin:
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);
}
If you'd like to contribute to the development of StaX or create plugins for it, feel free to fork the repository and submit your changes via a Pull Request.
This project is licensed under the MIT License. For more details, see the LICENSE file.