{"id":13779187,"url":"https://github.com/jp2masa/Movere","last_synced_at":"2025-05-11T12:32:55.460Z","repository":{"id":53869577,"uuid":"191078237","full_name":"jp2masa/Movere","owner":"jp2masa","description":"Movere is an implementation of managed dialogs for Avalonia.","archived":false,"fork":false,"pushed_at":"2024-09-20T02:18:07.000Z","size":722,"stargazers_count":36,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-30T01:02:46.585Z","etag":null,"topics":["avalonia","avaloniaui","csharp","dialogs"],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jp2masa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"jp2masa"}},"created_at":"2019-06-10T01:52:44.000Z","updated_at":"2024-09-24T11:20:42.000Z","dependencies_parsed_at":"2024-01-13T12:22:55.592Z","dependency_job_id":"791a9435-b297-4cad-a461-929ae45c068c","html_url":"https://github.com/jp2masa/Movere","commit_stats":{"total_commits":377,"total_committers":2,"mean_commits":188.5,"dds":"0.0026525198938992522","last_synced_commit":"4710189197c59bc72c35cbc80369e50676afb416"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jp2masa%2FMovere","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jp2masa%2FMovere/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jp2masa%2FMovere/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jp2masa%2FMovere/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jp2masa","download_url":"https://codeload.github.com/jp2masa/Movere/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225049033,"owners_count":17412914,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["avalonia","avaloniaui","csharp","dialogs"],"created_at":"2024-08-03T18:01:02.284Z","updated_at":"2024-11-17T14:31:14.865Z","avatar_url":"https://github.com/jp2masa.png","language":"C#","readme":"[![Build Status](https://github.com/jp2masa/Movere/actions/workflows/build.yml/badge.svg?branch=master)](https://github.com/jp2masa/Movere/actions/workflows/build.yml)\r\n[![NuGet](https://img.shields.io/nuget/v/Movere.svg)](https://www.nuget.org/packages/Movere/)\r\n[![MyGet](https://img.shields.io/myget/jp2masa/vpre/Movere.svg?label=myget)](https://www.myget.org/feed/jp2masa/package/nuget/Movere)\r\n\r\n# Movere\r\n\r\n![Movere](Icon.png)\r\n\r\nMovere 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.\r\n\r\n## Getting Started\r\n\r\n### Registering file dialogs with Avalonia\r\n\r\nTo use Avalonia system dialog APIs, it's possible to simply register Movere dialogs with `AppBuilder`:\r\n\r\n1. Import `Movere` namespace:\r\n\r\n```cs\r\nusing Movere;\r\n```\r\n\r\n2. Add `UseMovere` to `AppBuilder` configuration. Example:\r\n\r\n```cs\r\nAppBuilder.Configure\u003cApp\u003e()\r\n    .UsePlatformDetect()\r\n    .UseMovere();\r\n```\r\n\r\n3. Then use Avalonia system dialog APIs. Example:\r\n\r\n```cs\r\nvar dialog = new OpenFileDialog();\r\nvar result = await dialog.ShowAsync(parent);\r\n```\r\n\r\n### Using dialog services\r\n\r\nTo simply use the dialogs (this example is for message dialogs, but it's similar for others):\r\n\r\n1. Create a dialog service for `Window` (owner):\r\n\r\n```cs\r\nvar messageDialogService = new MessageDialogService(owner);\r\n```\r\n\r\n2. Pass the service to View Model:\r\n\r\n```cs\r\nwindow.DataContext = new ViewModel(messageDialogService);\r\n```\r\n\r\n3. Show dialog from View Model when you need to:\r\n\r\n```cs\r\nprivate Task ShowInfoAsync() =\u003e\r\n    _messageDialogService.ShowMessageDialogAsync(\r\n        new MessageDialogOptions(\r\n            DialogIcon.Info,\r\n            \"Message Dialog\",\r\n            \"Some info\",\r\n            DialogResultSet.OK));\r\n```\r\n\r\nAvailable icons are:\r\n\r\n- `DialogIcon.None`\r\n- `DialogIcon.Info`\r\n- `DialogIcon.Warning`\r\n- `DialogIcon.Error`\r\n\r\nTo add your own icon, just create an instance of `DialogIcon` and pass the resource string, e.g `avares://My.App/Resources/Icons/MyIcon.png`.\r\n\r\nDialog results are extensible as well, and support localization.\r\n\r\n## Roadmap\r\n\r\n- Maybe separate file explorer view into separate project.\r\n- Improve styles for dialogs.\r\n- Add tests.\r\n- Print dialog.\r\n- Eventually move file explorer logic to a separate project and create a file explorer application.\r\n\r\n## Credits\r\n\r\n### Icons\r\n\r\n#### [flaticon.com](https://www.flaticon.com)\r\n- File - [Kiranshastry](https://www.flaticon.com/authors/kiranshastry)\r\n- Folder - [Smashicons](https://www.flaticon.com/authors/smashicons)\r\n\r\n### _The project logo is from [linea.io](http://linea.io)._\r\n","funding_links":["https://github.com/sponsors/jp2masa"],"categories":["Libraries \u0026 Extensions"],"sub_categories":["Controls"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjp2masa%2FMovere","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjp2masa%2FMovere","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjp2masa%2FMovere/lists"}