Movere 0.2.1-beta.1
Prefix Reserveddotnet add package Movere --version 0.2.1-beta.1
NuGet\Install-Package Movere -Version 0.2.1-beta.1
<PackageReference Include="Movere" Version="0.2.1-beta.1" />
paket add Movere --version 0.2.1-beta.1
#r "nuget: Movere, 0.2.1-beta.1"
// Install Movere as a Cake Addin #addin nuget:?package=Movere&version=0.2.1-beta.1&prerelease // Install Movere as a Cake Tool #tool nuget:?package=Movere&version=0.2.1-beta.1&prerelease
Movere
Movere is an implementation of managed dialogs for Avalonia. Currently there are message dialogs, as well as open and save file dialogs, and a print dialog (based on System.Drawing.Printing
) is WIP.
Getting Started
Registering file dialogs with Avalonia
To use Avalonia system dialog APIs, it's possible to simply register Movere dialogs with AppBuilder
:
- Import
Movere
namespace:
using Movere;
- Add
UseMovere
toAppBuilder
configuration. Example:
AppBuilder.Configure<App>()
.UsePlatformDetect()
.UseMovere();
- Then use Avalonia system dialog APIs. Example:
var dialog = new OpenFileDialog();
var result = await dialog.ShowAsync(parent);
Using dialog services
To simply use the dialogs (this example is for message dialogs, but it's similar for others):
- Create a dialog service for
Window
(owner):
var messageDialogService = new MessageDialogService(owner);
- Pass the service to View Model:
window.DataContext = new ViewModel(messageDialogService);
- Show dialog from View Model when you need to:
private Task ShowInfoAsync() =>
_messageDialogService.ShowMessageDialogAsync(
new MessageDialogOptions(
DialogIcon.Info,
"Message Dialog",
"Some info",
DialogResultSet.OK));
Available icons are:
DialogIcon.None
DialogIcon.Info
DialogIcon.Warning
DialogIcon.Error
To add your own icon, just create an instance of DialogIcon
and pass the resource string, e.g avares://My.App/Resources/Icons/MyIcon.png
.
Dialog results are extensible as well, and support localization.
Roadmap
- Maybe separate file explorer view into separate project.
- Improve styles for dialogs.
- Add tests.
- Print dialog.
- Eventually move file explorer logic to a separate project and create a file explorer application.
Credits
Icons
flaticon.com
- File - Kiranshastry
- Folder - Smashicons
The project logo is from linea.io.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Autofac (>= 8.0.0)
- Avalonia (>= 11.1.3)
- Avalonia.Desktop (>= 11.1.3)
- Avalonia.Labs.Panels (>= 11.1.0)
- Avalonia.ReactiveUI (>= 11.1.3)
- Avalonia.Xaml.Behaviors (>= 11.1.0)
- ReactiveUI (>= 20.1.1)
- System.Collections.Immutable (>= 6.0.0)
- System.Drawing.Common (>= 6.0.0)
-
net6.0
- Autofac (>= 8.0.0)
- Avalonia (>= 11.1.3)
- Avalonia.Desktop (>= 11.1.3)
- Avalonia.Labs.Panels (>= 11.1.0)
- Avalonia.ReactiveUI (>= 11.1.3)
- Avalonia.Xaml.Behaviors (>= 11.1.0)
- ReactiveUI (>= 20.1.1)
- System.Drawing.Common (>= 6.0.0)
-
net8.0
- Autofac (>= 8.0.0)
- Avalonia (>= 11.1.3)
- Avalonia.Desktop (>= 11.1.3)
- Avalonia.Labs.Panels (>= 11.1.0)
- Avalonia.ReactiveUI (>= 11.1.3)
- Avalonia.Xaml.Behaviors (>= 11.1.0)
- ReactiveUI (>= 20.1.1)
- System.Drawing.Common (>= 6.0.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Movere:
Package | Downloads |
---|---|
Movere.Win32
Movere is an implementation of managed dialogs for Avalonia. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
0.2.1-beta.1 | 60 | 9/20/2024 |
0.2.0 | 159 | 9/5/2024 |
0.1.0 | 697 | 8/26/2019 |