Bread.Mvc.Avalonia
1.6.0
dotnet add package Bread.Mvc.Avalonia --version 1.6.0
NuGet\Install-Package Bread.Mvc.Avalonia -Version 1.6.0
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.6.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Bread.Mvc.Avalonia" Version="1.6.0" />
<PackageReference Include="Bread.Mvc.Avalonia" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Bread.Mvc.Avalonia --version 1.6.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Bread.Mvc.Avalonia, 1.6.0"
#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.
#:package Bread.Mvc.Avalonia@1.6.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Bread.Mvc.Avalonia&version=1.6.0
#tool nuget:?package=Bread.Mvc.Avalonia&version=1.6.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Bread.Mvc.Avalonia
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 | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- Avalonia.Desktop (>= 12.0.0)
- Bread.Mvc (>= 1.6.0)
-
net8.0
- Avalonia.Desktop (>= 12.0.0)
- Bread.Mvc (>= 1.6.0)
-
net9.0
- Avalonia.Desktop (>= 12.0.0)
- Bread.Mvc (>= 1.6.0)
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.6.0 | 87 | 4/11/2026 |
| 1.5.9 | 143 | 1/25/2026 |
| 1.5.8 | 231 | 12/4/2025 |
| 1.5.7 | 531 | 12/1/2025 |
| 1.5.6 | 323 | 9/15/2025 |
| 1.5.5 | 211 | 8/17/2025 |
| 1.5.4 | 240 | 6/22/2025 |
| 1.5.3 | 365 | 6/10/2025 |
| 1.5.2 | 335 | 6/9/2025 |
| 1.5.1.1 | 223 | 6/5/2025 |
| 1.5.1 | 361 | 3/4/2025 |
| 1.5.0 | 221 | 12/3/2024 |
| 1.4.4.5 | 243 | 9/1/2024 |
| 1.4.4.4 | 218 | 9/1/2024 |
| 1.4.4.3 | 235 | 9/1/2024 |
| 1.4.4.2 | 254 | 8/16/2024 |
| 1.4.4.1 | 199 | 8/5/2024 |
| 1.4.4 | 223 | 7/24/2024 |
| 1.4.3 | 235 | 6/28/2024 |
| 1.4.2 | 238 | 6/3/2024 |
Loading failed