Bread.Mvc.Avalonia 1.4.4.5

dotnet add package Bread.Mvc.Avalonia --version 1.4.4.5                
NuGet\Install-Package Bread.Mvc.Avalonia -Version 1.4.4.5                
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="Bread.Mvc.Avalonia" Version="1.4.4.5" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Bread.Mvc.Avalonia --version 1.4.4.5                
#r "nuget: Bread.Mvc.Avalonia, 1.4.4.5"                
#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 Bread.Mvc.Avalonia as a Cake Addin
#addin nuget:?package=Bread.Mvc.Avalonia&version=1.4.4.5

// Install Bread.Mvc.Avalonia as a Cake Tool
#tool nuget:?package=Bread.Mvc.Avalonia&version=1.4.4.5                

Bread.Mvc.Avalonia

NuGet Status

Bread.Mvc.Avalonia 包含一些非常有用的扩展。

IUIDispatcher 接口 :UI线程注入

Bread.Mvc.Avalonia.MainThreadDispatcher 实现了 IUIDispatcher 接口。 因为当属性被外部线程修改时,Watch 机制需要使用这个接口检测当前线程是否在主线程中,并将变更 Invoke 给UI线程,所以您必须在Avalonia应用中注册这个服务。

 builder.AddSingleton<IUIDispatcher, Bread.Mvc.Avalonia.MainThreadDispatcher>();

Reactive

为了简化 Watch 操作,我们为常见的控件准备了更易用的绑定方法。


public interface IEnumDescriptioner<T> where T : Enum
{
    string GetDescription(T value);
}

public partial class SettingsPanel : UserControl
{
    SpotModel _spot = null!;

    public EngineSettingsPanel()
    {
        InitializeComponent();

        if (Design.IsDesignMode) return;

        _spot = IoC.Get<SpotModel>();

        // combox initted by enum which LanguageHelper implements IEnumDescriptioner
        uiComboxLanguage.InitBy(new LanguageHelper(), Language.Chinese, 
            Language.English, Language.Japanese, Language.Japanese); 

        uiComboxLanguage.BindTo(_spot, m => m.Language); // ComboBox
       
        uiNUDAutoSave.BindTo(_app, x => x.AutoSave); // NumericUpDown
        uiTbRegCode.BindTo(_app, x => x.RegCode); // TextBox
        uiTbFilePath.BindTo(_app, x => x.FilePath); // TextBlock

        uiSlider.BindTo(_app, x => x.Progress); // Slider

        uiSwitchAutoSpot.BindTo(_spot, m => m.IsAutoSpot); // SwitchButton
        uiTbtnChannel.BindTo(_app, x => x.IsLeftChannel); // ToggleButton

        uiCheckSexual.BindTo(_app, x => x.IsMale); // CheckBox
    }
}

Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  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 is compatible.  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. 
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.4.4.5 105 9/1/2024
1.4.4.4 96 9/1/2024
1.4.4.3 95 9/1/2024
1.4.4.2 122 8/16/2024
1.4.4.1 73 8/5/2024
1.4.4 87 7/24/2024
1.4.3 110 6/28/2024
1.4.2 103 6/3/2024
1.4.1.1 123 4/9/2024
1.4.1 117 2/20/2024
1.4.0 136 1/23/2024
1.3.9 210 11/20/2023
1.3.8 136 10/26/2023
1.3.7 143 10/10/2023
1.3.6 131 8/31/2023
1.3.5 147 8/17/2023
1.3.4.1 139 8/12/2023
1.3.4 158 8/7/2023
1.3.3 155 7/16/2023
1.3.2 158 7/5/2023
1.3.1 101 6/27/2023
1.3.0 99 6/3/2023
1.2.0 152 4/30/2023
1.1.0 188 4/17/2023
1.0.6 174 4/13/2023
1.0.5 158 4/11/2023