AvaloniaExtensions.Axaml 0.0.1.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package AvaloniaExtensions.Axaml --version 0.0.1.1                
NuGet\Install-Package AvaloniaExtensions.Axaml -Version 0.0.1.1                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="AvaloniaExtensions.Axaml" Version="0.0.1.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add AvaloniaExtensions.Axaml --version 0.0.1.1                
#r "nuget: AvaloniaExtensions.Axaml, 0.0.1.1"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install AvaloniaExtensions.Axaml as a Cake Addin
#addin nuget:?package=AvaloniaExtensions.Axaml&version=0.0.1.1

// Install AvaloniaExtensions.Axaml as a Cake Tool
#tool nuget:?package=AvaloniaExtensions.Axaml&version=0.0.1.1                

AvaloniaExtensions

A syntactic sugar library that brings convenience to Avalonia UI development.

Install

Install-Package AvaloniaExtensions.Axaml -Version 0.0.1

I18n

MainWindow8.axaml:

<Window xmlns="https://github.com/avaloniaui"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:vm="using:AvaloniaExtensions.Axaml.Demo.ViewModels"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:i18n="https://codewf.com"
        xmlns:l="clr-namespace:AvaloniaExtensions.Axaml.Demo.I18n"
        mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
        x:Class="AvaloniaExtensions.Axaml.Demo.Views.MainWindow"
        x:DataType="vm:MainWindowViewModel"
        Icon="/Assets/avalonia-logo.ico"
        Title="{i18n:I18n {Binding Title}}">

    <Design.DataContext>
        
        <vm:MainWindowViewModel />
    </Design.DataContext>

    <StackPanel>
        <TextBlock HorizontalAlignment="Center"
                   VerticalAlignment="Center">
            <Run Text="{i18n:I18n {Binding Title}}" />
            <Run Text="{i18n:I18n {x:Static l:LanguageKeys.Welcome}}" />
        </TextBlock>
        <StackPanel Orientation="Horizontal">
            <Button Content="English" Command="{Binding RaiseChangeLanguageHandler}" CommandParameter="en" />
            <Button Content="中文简体" Command="{Binding RaiseChangeLanguageHandler}" CommandParameter="zh-CN" />
            <Button Content="中文繁體" Command="{Binding RaiseChangeLanguageHandler}" CommandParameter="zh-Hant" />
            <Button Content="日本語" Command="{Binding RaiseChangeLanguageHandler}" CommandParameter="ja-JP" />
        </StackPanel>
    </StackPanel>

</Window>

MainWindowViewwModel:

public class MainWindowViewModel : ViewModelBase
{
    public string Title => "AppName";

    public void RaiseChangeLanguageHandler(string language)
    {
        I18nManager.Instance.Culture = new CultureInfo(language);
    }
}
public static class Language
{
		public static readonly string AppName = "AppName";
		public static readonly string Welcome = "Welcome";
}

Acknowledgments

Taking from open source and contributing to open source. The development of this library was referenced from the following open source projects or articles:

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.1 45 12/24/2024
1.0.0 72 12/23/2024
0.0.2.9 100 12/11/2024
0.0.2.8 138 11/13/2024
0.0.2.7 133 9/18/2024
0.0.2.5 150 8/18/2024
0.0.2.4 116 8/18/2024
0.0.2.3 118 8/17/2024
0.0.2.1 133 8/16/2024
0.0.1.1 128 8/15/2024
0.0.1 125 8/14/2024