Movere.Win32 0.2.1-beta.1

Prefix Reserved
This is a prerelease version of Movere.Win32.
dotnet add package Movere.Win32 --version 0.2.1-beta.1
                    
NuGet\Install-Package Movere.Win32 -Version 0.2.1-beta.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Movere.Win32" Version="0.2.1-beta.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Movere.Win32" Version="0.2.1-beta.1" />
                    
Directory.Packages.props
<PackageReference Include="Movere.Win32" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Movere.Win32 --version 0.2.1-beta.1
                    
#r "nuget: Movere.Win32, 0.2.1-beta.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Movere.Win32@0.2.1-beta.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Movere.Win32&version=0.2.1-beta.1&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Movere.Win32&version=0.2.1-beta.1&prerelease
                    
Install as a Cake Tool

Build Status NuGet MyGet

Movere

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:

  1. Import Movere namespace:
using Movere;
  1. Add UseMovere to AppBuilder configuration. Example:
AppBuilder.Configure<App>()
    .UsePlatformDetect()
    .UseMovere();
  1. 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):

  1. Create a dialog service for Window (owner):
var messageDialogService = new MessageDialogService(owner);
  1. Pass the service to View Model:
window.DataContext = new ViewModel(messageDialogService);
  1. 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

The project logo is from linea.io.

Product Compatible and additional computed target framework versions.
.NET 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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.2.1-beta.1 83 9/20/2024
0.2.0 141 9/13/2024