Brows.Operations.Windows
1.2.0
dotnet add package Brows.Operations.Windows --version 1.2.0
NuGet\Install-Package Brows.Operations.Windows -Version 1.2.0
<PackageReference Include="Brows.Operations.Windows" Version="1.2.0" />
<PackageVersion Include="Brows.Operations.Windows" Version="1.2.0" />
<PackageReference Include="Brows.Operations.Windows" />
paket add Brows.Operations.Windows --version 1.2.0
#r "nuget: Brows.Operations.Windows, 1.2.0"
#:package Brows.Operations.Windows@1.2.0
#addin nuget:?package=Brows.Operations.Windows&version=1.2.0
#tool nuget:?package=Brows.Operations.Windows&version=1.2.0
Brows.Operations.Windows
WPF presentation for Brows.Operations. The package provides OperatorControl, which displays relevant root operations and their child hierarchy, progress, errors, and root-level Cancel or Remove commands.
Assign an operator created through the Composition package to the control's Operator property:
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:operations="clr-namespace:Brows.Operations;assembly=Brows.Operations.Windows">
<operations:OperatorControl x:Name="OperationView" />
</Window>
// operatorFactory is resolved through Brows.Composition.
OperationView.Operator = operatorFactory.Create();
Set OperationItemsTemplate to choose the items control used for both root and child collections:
<operations:OperatorControl x:Name="OperationView">
<operations:OperatorControl.OperationItemsTemplate>
<DataTemplate>
<ListBox ItemsSource="{Binding}" />
</DataTemplate>
</operations:OperatorControl.OperationItemsTemplate>
</operations:OperatorControl>
The template receives the collection source as its data context. Bind ItemsSource to it; the built-in operation row template remains available. A ListView can be used the same way. Leaving OperationItemsTemplate unset or setting it to null uses the default ItemsControl.
Set OperationErrorTemplate to customize how an operation's exception is displayed. The template receives the exception itself as its data context:
<operations:OperatorControl.OperationErrorTemplate>
<DataTemplate>
<TextBlock Text="{Binding Message}" Foreground="DarkRed" TextWrapping="Wrap" />
</DataTemplate>
</operations:OperatorControl.OperationErrorTemplate>
Leaving OperationErrorTemplate unset or setting it to null uses the default message display.
The built-in Cancel and Remove commands raise CanExecuteChanged on the control's dispatcher, because operation state changes run there. As a safeguard, a notification raised on any other thread is queued asynchronously to the dispatcher that created the command.
The project targets net8.0-windows and net10.0-windows and requires WPF. Create the operator on the control's dispatcher thread, for example by calling IOperatorFactory.Create() there; setting an operator created on another thread or without a synchronization context throws InvalidOperationException. Operation state, notifications, and collection changes then run on the dispatcher, while work can start operations and report progress from any thread. See the repository for the threading contract, the sample project, and usage guidance.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0-windows7.0 is compatible. net9.0-windows was computed. net10.0-windows was computed. net10.0-windows7.0 is compatible. |
| .NET Framework | net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 is compatible. net481 was computed. |
-
.NETFramework 4.6.2
- Brows.Operations (>= 1.2.0)
- Domore.Logs (>= 10.6.4)
- Domore.Notification (>= 10.6.4)
- System.ValueTuple (>= 4.5.0)
-
.NETFramework 4.8
- Brows.Operations (>= 1.2.0)
- Domore.Logs (>= 10.6.4)
- Domore.Notification (>= 10.6.4)
-
net10.0-windows7.0
- Brows.Operations (>= 1.2.0)
- Domore.Logs (>= 10.6.4)
- Domore.Notification (>= 10.6.4)
-
net8.0-windows7.0
- Brows.Operations (>= 1.2.0)
- Domore.Logs (>= 10.6.4)
- Domore.Notification (>= 10.6.4)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.