Bread.Mvc.Avalonia 1.3.8

There is a newer version of this package available.
See the version list below for details.
dotnet add package Bread.Mvc.Avalonia --version 1.3.8                
NuGet\Install-Package Bread.Mvc.Avalonia -Version 1.3.8                
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.3.8" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Bread.Mvc.Avalonia --version 1.3.8                
#r "nuget: Bread.Mvc.Avalonia, 1.3.8"                
#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.3.8

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

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 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. 
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 107 9/1/2024
1.4.4.4 101 9/1/2024
1.4.4.3 100 9/1/2024
1.4.4.2 124 8/16/2024
1.4.4.1 75 8/5/2024
1.4.4 89 7/24/2024
1.4.3 112 6/28/2024
1.4.2 105 6/3/2024
1.4.1.1 125 4/9/2024
1.4.1 119 2/20/2024
1.4.0 138 1/23/2024
1.3.9 212 11/20/2023
1.3.8 138 10/26/2023
1.3.7 147 10/10/2023
1.3.6 133 8/31/2023
1.3.5 149 8/17/2023
1.3.4.1 143 8/12/2023
1.3.4 160 8/7/2023
1.3.3 157 7/16/2023
1.3.2 160 7/5/2023
1.3.1 103 6/27/2023
1.3.0 101 6/3/2023
1.2.0 156 4/30/2023
1.1.0 190 4/17/2023
1.0.6 176 4/13/2023
1.0.5 162 4/11/2023