.xaml
but due to problems with Visual Studio we have been forced to move to our own .axaml
extension for Avalonia XAML files. From version 0.9.11 Avalonia XAML files created in Visual Studio use the .axaml
extension and from version 0.10 all of our templates will be standardized on using the .axaml
extension..xaml
and .axaml
will be supported going foward, so feel free to use the extension you prefer.Window
- this descibes the type of the root control in the XAML file; in this case Window
βxmlns="https://github.com/avaloniaui"
- this is the XAML namespace for Avalonia. Without this, the file will not be recognised as an Avalonia XAML document.xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- this is the XAML-language XAML namespace. This isn't strictly necessary, but you will probably need it for accessing certain features of the XAML language.x:Class="AvaloniaApplication1.MainWindow"
- this tells the XAML compiler where to find the associated class for this file, defined in code-behindβButton.Content
is declared as a [Content]
Property which means that any content placed inside its XML tag will be assigned to this property.{Binding}
markup extension:.xaml.cs
. For more information see the codebehind documentation.