{"id":14965008,"url":"https://github.com/avaloniaui/avalonia.samples","last_synced_at":"2025-05-14T23:06:41.037Z","repository":{"id":52450314,"uuid":"519575365","full_name":"AvaloniaUI/Avalonia.Samples","owner":"AvaloniaUI","description":"Avalonia.Samples aims to provide some minimal samples focusing on a particular issue at a time. This should help getting new users started.","archived":false,"fork":false,"pushed_at":"2025-04-30T19:31:35.000Z","size":26733,"stargazers_count":871,"open_issues_count":35,"forks_count":155,"subscribers_count":20,"default_branch":"main","last_synced_at":"2025-05-14T23:06:17.255Z","etag":null,"topics":["avalonia","avaloniaui","c-sharp","cross-platform","dotnet","front-end-development","hacktoberfest","sample-code","samples","tutorials"],"latest_commit_sha":null,"homepage":"https://www.avaloniaui.net","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AvaloniaUI.png","metadata":{"files":{"readme":"README.adoc","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2022-07-30T17:07:38.000Z","updated_at":"2025-05-14T08:40:34.000Z","dependencies_parsed_at":"2023-01-31T01:45:47.012Z","dependency_job_id":"c2b367dc-d34e-4507-b55f-fe893d23b323","html_url":"https://github.com/AvaloniaUI/Avalonia.Samples","commit_stats":{"total_commits":172,"total_committers":18,"mean_commits":9.555555555555555,"dds":0.3023255813953488,"last_synced_commit":"274b622565564aead4338378efc958e4f9b7f668"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AvaloniaUI%2FAvalonia.Samples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AvaloniaUI%2FAvalonia.Samples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AvaloniaUI%2FAvalonia.Samples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AvaloniaUI%2FAvalonia.Samples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AvaloniaUI","download_url":"https://codeload.github.com/AvaloniaUI/Avalonia.Samples/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254243362,"owners_count":22038046,"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","c-sharp","cross-platform","dotnet","front-end-development","hacktoberfest","sample-code","samples","tutorials"],"created_at":"2024-09-24T13:34:05.702Z","updated_at":"2025-05-14T23:06:36.018Z","avatar_url":"https://github.com/AvaloniaUI.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"= Avalonia image:_docs/_Assets/Logo.svg[link=https://www.avaloniaui.net] Samples \n:toc:\n:toc-placement!:\n:tip-caption: :bulb:\n:note-caption: :information_source:\n:important-caption: :heavy_exclamation_mark:\n:caution-caption: :fire:\n:warning-caption: :warning:\n\nWelcome to **Avalonia.Samples**. This is a collection of minimal samples, which should make it easy for everyone to get started with https://www.avaloniaui.net[Avalonia^]. Each sample is focusing on only one aspect of Avalonia.\n\ntoc::[]\n\n[#get-in-touch]\n== 🗯 Get in touch with us\n\nIf you have feedback, questions or suggestions feel free to contact us via:\n\nimage:https://raw.githubusercontent.com/Patrolavia/telegram-badge/master/chat.svg[link=https://t.me/Avalonia]\nimage:https://badges.gitter.im/Join%20Chat.svg[link=https://gitter.im/AvaloniaUI/Avalonia?utm_campaign=pr-badge\u0026utm_content=badge\u0026utm_medium=badge\u0026utm_source=badge]\nimage:https://img.shields.io/badge/discord-join%20chat-46BC99[link=https://aka.ms/dotnet-discord]\n\nOr file a new bug-report or feature request in the https://github.com/AvaloniaUI/Avalonia.Samples/issues[`Issues`]-section.\n\n\n[#_organization_of_the_samples]\n== 📂 Organization of the Samples\n\nEvery sample can be found in its own sub-folder and can run without any reference to another sample. Nevertheless we have a `*.sln`-file which has all projects in one solution, if you are looking for a complete collection of samples.\n\nYou can find the list of samples \u003c\u003csamples,below\u003e\u003e. The samples are structured in different categories and difficulties. For better search results, each sample is also tagged with some **buzz-words**.\n\nIn every sample folder you will find a `README`-file, which describes the sample in detail and, if applicable, has links to further information and documentation.\n\n\n[#_difficulties]\n=== 🐣 Difficulties\n\nEach sample is tagged with its difficulty. The degree of difficulty describes how much base-knowledge a user should have.\n\n\n[cols=\"1,1,2\"]\n|===\n| 🔘 | Difficulty  | Degree of knowledge\n\n| 🐣 | Beginner\n| A Beginner must not have any knowledge of Avalonia. Nevertheless some basic knowledge of `C#`, `X(A)ML` and  your IDE is mandatory.\n\n| 🐥 | Easy\n| Some very basic knowledge of Avalonia is needed.\n\n| 🐔 | Normal\n| The user is somewhat experienced with Avalonia.\n\n| 🐉 | Hard\n| These samples are focusing on non-standard tasks, which most users will not need to know.\n\n|===\n\n\n[#samples]\n== ✍️ Samples\n\n////\n Copy the below for a new entry in the sample-tables and replace the text in \u003c\u003c \u003e\u003e with your content.\n\n| link:src/Avalonia.Samples/\u003c\u003cThe_Chapter\u003e\u003e/\u003c\u003cTheSubFolder\u003e\u003e[\u003c\u003cYour Title\u003e\u003e]\n| \u003c\u003cThe difficulty\u003e\u003e\n| \u003c\u003cThe buzz-words\u003e\u003e\n////\n\n\n[#_mvvm_samples]\n=== 💡 MVVM-Samples\n\n[cols=\"25h,25,50\"]\n|===\n| Sample | Difficulty | Buzz-Words\n\n| link:src/Avalonia.Samples/MVVM/BasicMvvmSample[Basic MVVM Sample]\n| 🐣 Beginner\n| MVVM, Model-View-ViewModel, ReactiveUI, INotifyPropertyChanged, XAML, Binding\n\n| link:src/Avalonia.Samples/MVVM/CommandSample[Commands Sample]\n| 🐣 Beginner\n| Command, ICommand, CommandParameter, MVVM, ReactiveCommand, async-await\n\n| link:src/Avalonia.Samples/MVVM/ValueConversionSample[ValueConverter Sample]\n| 🐥 Easy\n| Converter, Binding, MultiBinding, IValueConverter, IMultiValueConverter, MVVM, FuncValueConverter\n\n| link:src/Avalonia.Samples/MVVM/ValidationSample[Validation Sample]\n| 🐥 Easy\n| MVVM, Data-Validation, Exception, Error, Error-Message, Binding\n\n|===\n\n\n\n[#_drawing_samples]\n=== ✒️ Drawing-Samples\n\n[cols=\"25h,25,50\"]\n|===\n| Sample | Difficulty | Buzz-Words\n\n| link:src/Avalonia.Samples/Drawing/BattleCity[BattleCity Game Sample]\n| 🐔 Normal\n| Game, Canvas, Game Loop, MVVM\n\n| link:src/Avalonia.Samples/Drawing/RectPainter[Rect Painter Sample]\n| 🐔 Normal\n| Graphics, MVVM\n\n|===\n\n[#_datatemplate_samples]\n=== 🎞️ DataTemplate-Samples\n\n[cols=\"25h,25,50\"]\n|===\n| Sample | Difficulty | Buzz-Words\n\n| link:src/Avalonia.Samples/DataTemplates/BasicDataTemplateSample[Basic DataTemplate Sample]\n| 🐔 Normal\n| DataTemplate, ToString, StringFormat, MVVM, ItemTemplate, ContentTemplate\n\n| link:src/Avalonia.Samples/DataTemplates/FuncDataTemplateSample[FuncDataTemplate Sample]\n| 🐔 Normal\n| FuncDataTemplate, DataTemplate, C#, Binding from code\n\n| link:src/Avalonia.Samples/DataTemplates/IDataTemplateSample[Implementing IDataTemplate Sample]\n| 🐔 Normal\n| IDataTemplate, DataTemplate, DataTemplateSelector\n\n|===\n\n\n[#_routing_navigation_samples]\n=== 🗺️ Routing / Navigation-Samples\n\n[cols=\"25h,25,50\"]\n|===\n| Sample | Difficulty | Buzz-Words\n\n| link:src/Avalonia.Samples/Routing/BasicViewLocatorSample[Basic ViewLocator Sample]\n| 🐔 Normal\n| ViewLocator, Routing, Wizard, Navigation, Page, MVVM\n\n|===\n\n\n[#_custom_controls_samples]\n=== 🛠️ Custom Controls Samples\n\n[cols=\"25h,25,50\"]\n|===\n| Sample | Difficulty | Buzz-Words\n\n| link:src/Avalonia.Samples/CustomControls/RatingControlSample[RatingControl Sample]\n| 🐔 Normal\n| Control, TemplatedControl, custom Control, reusable Control, AvaloniaProperty, StyledProperty, DirectProperty, ReadonlyProperty, Style, ControlTheme\n\n| link:src/Avalonia.Samples/CustomControls/SnowflakesControlSample[SnowflakesControl Sample]\n| 🐔 Normal\n| Custom Control, Render, Hit-Testing, Custom Animations\n\n|===\n\n\n[#_view_interaction_samples]\n=== ⚡ View Interaction Samples\n\n[cols=\"25h,25,50\"]\n|===\n| Sample | Difficulty | Buzz-Words\n\n| link:src/Avalonia.Samples/ViewInteraction/MvvmDialogSample[Mvvm Dialog Sample]\n| 🐔 Normal\n| MVVM, Dialog, FileDialogs, TopLevel, Clipboard\n\n| link:src/Avalonia.Samples/ViewInteraction/DialogManagerSample[Dialog Manager Sample]\n| 🐔 Normal\n| MVVM, Dialog, FileDialogs, TopLevel, Clipboard, DialogManager, CommunityToolkit.Mvvm\n\n|===\n\n[#_automated_ui_testing]\n=== 🧪️ Automated UI Testing\n\n[cols=\"25h,25,50\"]\n|===\n| Sample | Difficulty | Buzz-Words\n\n| link:src/Avalonia.Samples/Testing/TestableApp.Headless.XUnit[Testing with Headless XUnit]\n| 🐔 Normal\n| XUnit, Headless, Automation, UI Testing\n| link:src/Avalonia.Samples/Testing/TestableApp.Headless.NUnit[Testing with Headless NUnit]\n| 🐔 Normal\n| NUnit, Headless, Automation, UI Testing\n| link:src/Avalonia.Samples/Testing/TestableApp.Appium[Testing with Appium]\n| 🐉 Hard\n| XUnit, Appium, WinAppDriver, Automation, UI Testing\n\n|===\n\n[#_complete_apps]\n[complete-apps]\n=== 🧑‍💻 Complete Apps\n[cols=\"25h,25,50\"]\n|===\n| Sample | Difficulty | Buzz-Words\n\n| link:src/Avalonia.Samples/CompleteApps/SimpleToDoList[Simple ToDo-List]\n| 🐥 Easy\n| ToDo-List, Complete App, MVVM, CommunityToolkit.MVVM, Source Generator, Styles, Commands\n\n|===\n\n\n[#_contribution]\n== 🪛 Contribution\n\nIs anything missing? Have you found an error? Have you found an outdated sample? Or do you have a great idea?\n\nFantastic! Your contribution is welcome.\n\nNOTE: Before you start, make sure you have read the Code of Conduct.\n\n=== Code of Conduct\nThis project has adopted the code of conduct defined by the Contributor Covenant to clarify expected behavior in our community. For more information see the https://dotnetfoundation.org/code-of-conduct[Contributor Covenant Code of Conduct].\n\n[#_issues_and_feature_requests]\n=== Issues and Feature Requests\nIf you file a new issue or feature request, please fill in the templates available. If you found an issue in an existing sample, please link the sample and, if possible, point us to what is wrong.\n\n[#_pull_requests]\n=== Pull Requests\n\nNOTE: Pull requests may be discussed and probably not every pull request will be merged in the end. If you are not sure, please \u003c\u003cget-in-touch\u003e\u003e first. Anyway, every contribution is welcome.\n\n[#_fixing_an_existing_sample]\n==== Fixing an existing sample\n\nIf you find that in an existing sample, that something is unclear or missing, you can update the sample and file a pull request. Spelling mistakes or wrong wording can also be changed in a pull request.\n\nIMPORTANT: If you change the difficulty or the buzz-words, remember to also update the main page.\n\n[#_adding_a_new_sample]\n==== Adding a new sample\n\n. Add a new Project to the Solution: `src ► Avalonia.Samples ► Avalonia.Samples.sln`\n. In the root directory of the new sample add a `README`-file. We highly suggest using a template which you can find here:\n.. link:/_docs/AsciiDoc-Template/[AsciiDoc-Template]: If you want to provide richer content, we suggest using the https://asciidoc.org[ascii-doc]-template.\n.. link:/_docs/Markdown-Template/[Markdown-Template]: If you prefer not to use AsciiDoc, you can instead use the Markdown-template.\n\n// Comment this in for next year's Hacktoberfest\n//// \n=== 🎃 Hacktoberfest 2023\n\nWe are participating in https://hacktoberfest.com[[Hacktoberfest 2023\\]]. If you submit a valid pull request within this month, we will add the `HACKTOBERFEST-ACCEPTED` label to your PR. Read more about it and how to participate https://hacktoberfest.com/participation/[[here\\]].\n\nValid PRs are::\n- Adding a new sample\n- Fixing an existing sample\n- Improving an existing sample\n- Doing an overall spell-check (Not just changing a random word!)\n\nWARNING: Spam or invalid PRs will be marked as invalid. If you are unsure if your PR will be accepted for Hacktoberfest, you can ask us here or in the image:https://raw.githubusercontent.com/Patrolavia/telegram-badge/master/chat.svg[link=https://t.me/Avalonia]. \n\n🎃 Happy coding 🎃\n////\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favaloniaui%2Favalonia.samples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Favaloniaui%2Favalonia.samples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favaloniaui%2Favalonia.samples/lists"}