Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zhongzf/xamarin.forms.platform.avalonia
Xamarin Forms platform implemented with Avalonia (A multi-platform .NET UI framework)
https://github.com/zhongzf/xamarin.forms.platform.avalonia
avalonia forms-xamarin multi-platform
Last synced: about 1 month ago
JSON representation
Xamarin Forms platform implemented with Avalonia (A multi-platform .NET UI framework)
- Host: GitHub
- URL: https://github.com/zhongzf/xamarin.forms.platform.avalonia
- Owner: zhongzf
- License: mit
- Created: 2020-01-25T09:38:19.000Z (almost 5 years ago)
- Default Branch: develop
- Last Pushed: 2020-03-29T13:09:11.000Z (over 4 years ago)
- Last Synced: 2024-04-28T03:11:02.748Z (8 months ago)
- Topics: avalonia, forms-xamarin, multi-platform
- Language: C#
- Size: 813 KB
- Stars: 40
- Watchers: 3
- Forks: 2
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Xamarin.Forms.Platform.Avalonia
Xamarin Forms platform implemented with Avalonia (A multi-platform .NET UI framework)## Xamarin.Forms
Xamarin.Forms provides a way to quickly build native apps for iOS, Android, Windows and macOS, completely in C#.
Read more about the platform at https://www.xamarin.com/forms.
## Avalonia
Avalonia is a WPF-inspired cross-platform XAML-based UI framework providing a flexible styling system and supporting a wide range of OSs: Windows (.NET Framework, .NET Core), Linux (GTK), MacOS, Android and iOS.
Read more about the framework at https://avaloniaui.net.
## Getting Started ([中文说明](https://www.cnblogs.com/zhongzf/p/12275783.html))
1. Creating a new Avalonia project, read more about it at http://avaloniaui.net/docs/quickstart/create-new-project.
2. You can find the packages here [NuGet](https://www.nuget.org/packages/Xamarin.Forms.Platform.Avalonia/) and install the package like this:
```
Install-Package Xamarin.Forms.Platform.Avalonia
```
3. Build a Xamarin.Forms App, read more about it at https://docs.microsoft.com/en-us/xamarin/get-started/first-app.
4. Add the new created Xamarin.Forms App project as project reference to your new created Avalonia project.
5. Edit MainWindow.xaml.cs, add using:
```cs
using Xamarin.Forms.Platform.Avalonia;
```
6. Change the base class of MainWindow to **FormsApplicationPage**, and add **Forms.Init()** and **LoadApplication()** method call, '**FormsGallery.App**' in the code should be the name of your Xamarin.Forms App:
```cs
public class MainWindow : FormsApplicationPage
{
public MainWindow()
{
InitializeComponent();
#if DEBUG
this.AttachDevTools();
#endifXamarin.Forms.Forms.Init();
LoadApplication(new FormsGallery.App());
}private void InitializeComponent()
{
AvaloniaXamlLoader.Load(this);
}
}
```## Screenshot