Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thexds/ganymede
Dynamic UI generation MVVM framework
https://github.com/thexds/ganymede
mvvm-framework wpf
Last synced: about 2 months ago
JSON representation
Dynamic UI generation MVVM framework
- Host: GitHub
- URL: https://github.com/thexds/ganymede
- Owner: TheXDS
- License: mit
- Created: 2020-11-01T21:58:19.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2024-11-08T14:31:45.000Z (2 months ago)
- Last Synced: 2024-11-08T15:31:16.738Z (2 months ago)
- Topics: mvvm-framework, wpf
- Language: C#
- Homepage:
- Size: 3.74 MB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Ganymede
[![CodeFactor](https://www.codefactor.io/repository/github/thexds/ganymede/badge)](https://www.codefactor.io/repository/github/thexds/ganymede)
[![Build Ganymede](https://github.com/TheXDS/Ganymede/actions/workflows/build.yml/badge.svg)](https://github.com/TheXDS/Ganymede/actions/workflows/build.yml)
[![Publish Ganymede](https://github.com/TheXDS/Ganymede/actions/workflows/publish.yml/badge.svg)](https://github.com/TheXDS/Ganymede/actions/workflows/publish.yml)
[![Issues](https://img.shields.io/github/issues/TheXDS/Ganymede)](https://github.com/TheXDS/Ganymede/issues)
[![MIT](https://img.shields.io/github/license/TheXDS/Ganymede)](https://mit-license.org/)Ganymede is an app-template using common MVVM-frameworks. It includes helpers for navigation, base ViewModel classes, custom dialog services and common entry points. You just need to provide your actual ViewModels and views, not having to worry about implementing auxiliary UI services for them.
## Releases
Release | Link
--- | ---
Latest public release: | [![Latest stable NuGet package](https://buildstats.info/nuget/TheXDS.Ganymede)](https://www.nuget.org/packages/TheXDS.Ganymede/)
Latest development release: | [![Latest development NuGet package](https://buildstats.info/nuget/TheXDS.Ganymede?includePreReleases=true)](https://www.nuget.org/packages/TheXDS.Ganymede/)**Package Manager**
```sh
Install-Package TheXDS.Ganymede
```**.NET CLI**
```sh
dotnet add package TheXDS.Ganymede
```**Paket CLI**
```sh
paket add TheXDS.Ganymede
```**Package reference**
```xml```
## Building
Ganymede can be built on any platform or CI environment supported by dotnet.### Prerequisites
- [.Net SDK 8.0](https://dotnet.microsoft.com/).### Build Ganymede
```sh
dotnet build ./src/Ganymede.sln
```
The resulting binaries will be in the `./Build/bin` directory.## Usage
Ganymede provides a few library implementations to build apps on different frameworks. As of now, a library for [WPF](https://github.com/dotnet/wpf) has been implemented in an experimental state, one for [Avalonia UI](https://www.avaloniaui.net/) is in very early stages of development and other UI frameworks are under consideration.### Usage (With WPF bindings)
To use the WPF implementation of Ganymede, you can install the [`TheXDS.Ganymede.Wpf`](https://www.nuget.org/packages/TheXDS.Ganymede.Wpf/) NuGet package.#### TL;DR for WPF
- Create a new .NET 8 WPF project. Make sure that the project targets at least `net8.0-windows10.0.19041`
- Install `TheXDS.Ganymede.Wpf` on the project.
- On `App.xaml.cs`:
```csharp
using System.Windows;
using TheXDS.Ganymede.Helpers;
using TheXDS.Ganymede.Services;namespace WpfApp1;
public partial class App : Application
{
public App()
{
UiThread.SetProxy(new DispatcherUiThreadProxy());
}
}
```
- On `MainWindow.xaml`:
```xml
```
- On `TestViewModel.cs` (new file):
```csharp
using System.Windows.Input;
using TheXDS.Ganymede.Helpers;
using TheXDS.Ganymede.Types.Base;
namespace WpfApp1;
public class TestViewModel : ViewModel
{
public ICommand HelloCommand { get; }public TestViewModel()
{
var cb = CommandBuilder.For(this);
HelloCommand = cb.BuildSimple(OnHello);
}private async Task OnHello()
{
await DialogService.Message("Hello!", "This is a dialog message");
}
}
```
- On `TestView.xaml` (new user control):
```xml
```
## Contribute
[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/W7W415UCHY)If `Ganymede` is useful to you, or if you're interested in donating to sponsor the project, feel free to to a donation via [PayPal](https://paypal.me/thexds), [Ko-fi](https://ko-fi.com/W7W415UCHY) or just contact me directly.
Sadly, I cannot offer other means of sending donations as of right now due to my country (Honduras) not being supported by almost any platform.