Skip to content

Xamarin Forms platform implemented with Avalonia (A multi-platform .NET UI framework)

License

Notifications You must be signed in to change notification settings

zhongzf/Xamarin.Forms.Platform.Avalonia

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 (中文说明)

  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 and install the package like this:

Install-Package Xamarin.Forms.Platform.Avalonia
  1. Build a Xamarin.Forms App, read more about it at https://docs.microsoft.com/en-us/xamarin/get-started/first-app.
  2. Add the new created Xamarin.Forms App project as project reference to your new created Avalonia project.
  3. Edit MainWindow.xaml.cs, add using:
using Xamarin.Forms.Platform.Avalonia;
  1. 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:
    public class MainWindow : FormsApplicationPage
    {
        public MainWindow()
        {
            InitializeComponent();
#if DEBUG
            this.AttachDevTools();
#endif

            Xamarin.Forms.Forms.Init();
            LoadApplication(new FormsGallery.App());
        }

        private void InitializeComponent()
        {
            AvaloniaXamlLoader.Load(this);
        }
    }

Screenshot

About

Xamarin Forms platform implemented with Avalonia (A multi-platform .NET UI framework)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages