Avalonia.Samples aims to provide some minimal samples focusing on a particular issue at a time. This should help getting new users started.
Перейти к файлу
timunie 9fb51786cc Refactor: Move Dialog samples into ViewInteraction. 2023-11-14 21:40:26 +01:00
.github Added contribution guidelines and templates 2022-08-24 22:04:43 +02:00
_docs Added contribution guidelines and templates 2022-08-24 22:04:43 +02:00
src/Avalonia.Samples Refactor: Move Dialog samples into ViewInteraction. 2023-11-14 21:40:26 +01:00
.gitattributes Initial commit 2022-12-25 19:17:05 -05:00
.gitignore Add .gitignore 2022-07-30 20:44:32 +02:00
README.adoc Remove "driver" as it's not a driver 2023-07-21 02:32:08 -04:00

README.adoc

= Avalonia image:_docs/_Assets/Logo.svg[link=https://www.avaloniaui.net] Samples 
:toc:
:toc-placement!:
:tip-caption: :bulb:
:note-caption: :information_source:
:important-caption: :heavy_exclamation_mark:
:caution-caption: :fire:
:warning-caption: :warning:

Welcome 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. 

toc::[]

[#get-in-touch]
== 🗯 Get in touch with us

If you have feedback, questions or suggestions feel free to contact us via:

image:https://raw.githubusercontent.com/Patrolavia/telegram-badge/master/chat.svg[link=https://t.me/Avalonia] 
image:https://badges.gitter.im/Join%20Chat.svg[link=https://gitter.im/AvaloniaUI/Avalonia?utm_campaign=pr-badge&utm_content=badge&utm_medium=badge&utm_source=badge] 
image:https://img.shields.io/badge/discord-join%20chat-46BC99[link=https://aka.ms/dotnet-discord]

Or file a new bug-report or feature request in the https://github.com/AvaloniaUI/Avalonia.Samples/issues[`Issues`]-section.


== 📂 Organization of the Samples

Every 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. 

You can find the list of samples <<samples,below>>. The samples are structured in different categories and difficulties. For better search results, each sample is also tagged with some **buzz-words**.

In 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. 

=== 🐣 Difficulties

Each sample is tagged with it's difficulty. The degree of difficulty describes how much base-knowledge a user should have. 


[cols="1,1,2"]
|===
| 🔘 | Difficulty  | Degree of knowledge   

| 🐣 | Beginner
| A Beginner must not have any knowledge of Avalonia. Nevertheless some basic knowledge of `C#`, `X(A)ML` and  your IDE is mandatory 

| 🐥 | Easy    
| Some very basic knowledge of Avalonia is needed                                                                                    

| 🐔 | Normal         
| The user is somewhat experienced with Avalonia                                                                                     

| 🐉 | Hard            
| These samples are focusing on non-standard tasks, which most users will not need to know.                                          

|===
 

[#samples]
== ✍️ Samples

////
 Copy the below for a new entry in the sample-tables and replace the text in << >> with your content.

| link:src/Avalonia.Samples/<<The_Chapter>>/<<TheSubFolder>>[<<Your Title>>]
| <<The difficulty>>
| <<The buzz-words>>
////


=== 💡 MVVM-Samples

[cols="25h,25,50"]
|===
| Sample | Difficulty | Buzz-Words 

| link:src/Avalonia.Samples/MVVM/BasicMvvmSample[Basic MVVM Sample]
| 🐣 Beginner
| MVVM, Model-View-ViewModel, ReactiveUI, INotifyPropertyChanged, XAML, Binding

| link:src/Avalonia.Samples/MVVM/CommandSample[Commands Sample]
| 🐣 Beginner
| Command, ICommand, CommandParameter, MVVM, ReactiveCommand, async-await

| link:src/Avalonia.Samples/MVVM/ValueConversionSample[ValueConverter Sample]
| 🐥 Easy
| Converter, Binding, MultiBinding, IValueConverter, IMultiValueConverter, MVVM

| link:src/Avalonia.Samples/MVVM/ValidationSample[Validation Sample]
| 🐥 Easy
| MVVM, Data-Validation, Exception, Error, Error-Message, Binding

|===

=== ✒️ Drawing-Samples

[cols="25h,25,50"]
|===
| Sample | Difficulty | Buzz-Words 

| link:src/Avalonia.Samples/Drawing/BattleCity[BattleCity Game Sample]
| 🐔 Normal
| Game, Canvas, Game Loop, MVVM

|===

=== 🎞️ DataTemplate-Samples

[cols="25h,25,50"]
|===
| Sample | Difficulty | Buzz-Words 

| link:src/Avalonia.Samples/DataTemplates/BasicDataTemplateSample[Basic DataTemplate Sample]
| 🐔 Normal
| DataTemplate, ToString, StringFormat, MVVM, ItemTemplate, ContentTemplate

| link:src/Avalonia.Samples/DataTemplates/FuncDataTemplateSample[FuncDataTemplate Sample]
| 🐔 Normal
| FuncDataTemplate, DataTemplate, C#, Binding from code

| link:src/Avalonia.Samples/DataTemplates/IDataTemplateSample[Implementing IDataTemplate Sample]
| 🐔 Normal
| IDataTemplate, DataTemplate, DataTemplateSelector

|===


=== 🗺️ Routing / Navigation-Samples

[cols="25h,25,50"]
|===
| Sample | Difficulty | Buzz-Words 

| link:src\Avalonia.Samples\Routing\BasicViewLocatorSample[Basic ViewLocator Sample]
| 🐔 Normal
| ViewLocator, Routing, Wizard, Navigation, Page, MVVM

|===



=== 🛠️ Custom Controls Samples

[cols="25h,25,50"]
|===
| Sample | Difficulty | Buzz-Words 

| link:src\Avalonia.Samples\CustomControls\RatingControlSample[RatingControl Sample]
| 🐔 Normal
| Control, TemplatedControl, custom Control, reusable Control, AvaloniaProperty, StyledProperty, DirectProperty, ReadonlyProperty, Style, ControlTheme

|===

=== 🧪️ Automated UI Testing

[cols="25h,25,50"]
|===
| Sample | Difficulty | Buzz-Words

| link:src\Avalonia.Samples\Testing\TestableApp.Headless.XUnit[Testing with Headless XUnit]
| 🐔 Normal
| XUnit, Headless, Automation, UI Testing
| link:src\Avalonia.Samples\Testing\TestableApp.Headless.NUnit[Testing with Headless NUnit]
| 🐔 Normal
| NUnit, Headless, Automation, UI Testing
| link:src\Avalonia.Samples\Testing\TestableApp.Appium[Testing with Appium]
| 🐉 Hard
| XUnit, Appium, WinAppDriver, Automation, UI Testing

|===


== 🪛 Contribution

Is Anything missing? Have you found an error? Have you found an outdated sample? Or do you have a great idea? 

Fantastic! Your contribution is welcome. 

NOTE: Before you start, make sure you have read the Code of Conduct 

=== Code of Conduct
This 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]

=== Issues and Feature Requests
If 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 the point us to what is wrong. 

=== Pull Requests

NOTE: Pull requests may be discussed and probably not every pull request will be merged in the end. If you are not sure, please <<get-in-touch>> first. Anyway, every contribution is welcome.  

==== Fixing an existing sample

If you find that in an existing sample, that something is unclear or missing, you can update this sample and file a pull request. Also spelling mistakes or wrong wording can be changed and a pull request can be send.

IMPORTANT: If you change the difficulty or the buzz-words, remember to also update the main page. 

==== Adding a new sample

. Add a new Project to the Solution `src ► Avalonia.Samples ► Avalonia.Samples.sln`
. In the root directory of the new sample add a `ReadMe`-file. We highly suggest to use the template which you can find here: 
  .. link:/_docs/AsciiDoc-Template/[AsciiDoc-Template]: If you want to provide richer content, we suggest to use the https://asciidoc.org[ascii-doc]-template. 
  .. link:/_docs/Markdown-Template/[Markdown-Template]: If you don't like option a), you can use also the Markdown-template. 

// Comment this in for next years hacktober fest
//// 
=== 🎃 Hacktoberfest 2023

We 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\]]

Valid PRs are::
- Adding a new sample
- Fixing an existing sample
- Improve an existing sample
- Do an overall spell-check (Not just changing a random word!)

WARNING: 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]. 

🎃 Happy coding 🎃
////