. NET Core UI framework Avalonia, uiavalonia
. NET Core UI framework Avalonia, Avalonia is a cross-platform UI framework based on wpf xaml, and supports multiple operating systems: Windows (. NET Framework ,.. NET Core), Linux (GTK), MacOS, Android, and iOS.
Avalonia is currently in the testing stage.
GitHub: https://github.com/AvaloniaUI/Avalonia
Development Preparation
VS 2017 install extended https://marketplace.visualstudio.com/items? ItemName = AvaloniaTeam. AvaloniaforVisualStudio
Then you can develop the project
Select Avalonia Application to create a project. By default, two frameworks. NET Framework 4.6.1 and. NET Core 2.0 are created.
You can createWindow andUserControl.
Sample UI Project
Create a basic project myapp and add several buttons to MainWindow. xaml, which is the syntax of wpf xaml, and can directly implement the corresponding layout.
<Window xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="myapp"> <Grid Width="800" Height="600"> <StackPanel Margin="20"> <Button Content="Button1" Name="btn1"/> <Button Content="Button2"/> <Button Content="Button3"/> <TextBox Text="LineZero" Name="myText"></TextBox> </StackPanel> </Grid> </Window>
Background code
Public class MainWindow: Window {public MainWindow () {InitializeComponent (); # if DEBUG this. attachDevTools (); # endif} private void InitializeComponent () {AvaloniaXamlLoader. load (this); this. findControl <Button> ("btn1 "). click + = Btn1_Click;} private void Btn1_Click (object sender, Avalonia. interactivity. routedEventArgs e) {var txt = this. findControl <TextBox> ("myText"); txt. fontFamily = ""; txt. text = "LineZero button 1 ";}}
Run the program
By default, Chinese characters are displayed incorrectly. You can set the font.
Support installation for different systems: https://github.com/AvaloniaUI/Avalonia/wiki/Platform-support
AvalonStudio
Currently, Avalonia is a mature solution.
GitHub: https://github.com/VitalElement/AvalonStudio
At present, the official introduction has corresponding functions, and some operations are missing.
AvaloniaEdit. Demo is also a good example.
GitHub: https://github.com/AvaloniaUI/AvaloniaEdit
See the official documentation for better future of http://avaloniaui.net/guides/. NET Core.