Skip to content

DiGi.UI.WPF.Classes

github-actions[bot] edited this page Jul 15, 2026 · 2 revisions

DiGi.UI.WPF.Classes Namespace

Classes

CancellableIndeterminateWindowWorker Class

Provides a worker implementation that manages indeterminate progress updates for a window, allowing the operation to be cancelled.

public class CancellableIndeterminateWindowWorker : DiGi.UI.WPF.Classes.CancellableProgressBarWindowWorker, DiGi.Core.Interfaces.IIndeterminateWorker, DiGi.Core.Interfaces.IWorker

Inheritance System.Object → VisualWorker → DiGi.UI.WPF.Classes.WindowWorker<CancellableProgressBarWindow> → CancellableProgressBarWindowWorker → CancellableIndeterminateWindowWorker

Implements DiGi.Core.Interfaces.IIndeterminateWorker, DiGi.Core.Interfaces.IWorker

Constructors

CancellableIndeterminateWindowWorker() Constructor

Initializes a new instance of the CancellableIndeterminateWindowWorker class.

public CancellableIndeterminateWindowWorker();

CancellableIndeterminateWindowWorker(Window) Constructor

Initializes a new instance of the CancellableIndeterminateWindowWorker class with a specified owner window.

public CancellableIndeterminateWindowWorker(System.Windows.Window? owner);

Parameters

owner System.Windows.Window

The window that owns this worker.

Methods

CancellableIndeterminateWindowWorker.Report(string) Method

Reports a new progress status message to the associated window.

public void Report(string text);

Parameters

text System.String

The text describing the current progress state.

Implements Report(string)

CancellableProgressBarWindowWorker Class

Provides a worker implementation that manages a CancellableProgressBarWindow, allowing for progress reporting and operation cancellation.

public class CancellableProgressBarWindowWorker : DiGi.UI.WPF.Classes.WindowWorker<DiGi.UI.WPF.Windows.CancellableProgressBarWindow>, DiGi.Core.Interfaces.ICancellableWorker, DiGi.Core.Interfaces.IWorker

Inheritance System.Object → VisualWorker → DiGi.UI.WPF.Classes.WindowWorker<CancellableProgressBarWindow> → CancellableProgressBarWindowWorker

Derived
↳ CancellableIndeterminateWindowWorker

Implements DiGi.Core.Interfaces.ICancellableWorker, DiGi.Core.Interfaces.IWorker

Constructors

CancellableProgressBarWindowWorker() Constructor

Initializes a new instance of the CancellableProgressBarWindowWorker class.

public CancellableProgressBarWindowWorker();

CancellableProgressBarWindowWorker(Window) Constructor

Initializes a new instance of the CancellableProgressBarWindowWorker class with the specified owner window.

public CancellableProgressBarWindowWorker(System.Windows.Window? owner);

Parameters

owner System.Windows.Window

The optional owner window for the progress bar window.

Properties

CancellableProgressBarWindowWorker.CancellationPending Property

Gets a value indicating whether a cancellation is pending.

public bool CancellationPending { get; }

Implements CancellationPending

Property Value

System.Boolean

CancellableProgressBarWindowWorker.Text Property

Gets or sets the text displayed on the main label of the progress bar window.

public string? Text { get; set; }

Property Value

System.String

Methods

CancellableProgressBarWindowWorker.CancelAsync() Method

Initiates an asynchronous cancellation of the worker's operation.

public void CancelAsync();

Implements CancelAsync()

CancellingEventArgs Class

Provides data for events that can be cancelled.

public class CancellingEventArgs : System.EventArgs

Inheritance System.Object → System.EventArgs → CancellingEventArgs

Constructors

CancellingEventArgs() Constructor

Initializes a new instance of the CancellingEventArgs class.

public CancellingEventArgs();

CheckBoxTreeViewItemAddingEventArgs Class

Provides data for the event that occurs when a check box tree view item is being added.

public class CheckBoxTreeViewItemAddingEventArgs : DiGi.UI.WPF.Classes.TreeViewItemAddingEventArgs

Inheritance System.Object → System.EventArgs → ItemAddingEventArgs → TreeViewItemAddingEventArgs → CheckBoxTreeViewItemAddingEventArgs

Constructors

CheckBoxTreeViewItemAddingEventArgs(object) Constructor

Initializes a new instance of the CheckBoxTreeViewItemAddingEventArgs class.

public CheckBoxTreeViewItemAddingEventArgs(object? item);

Parameters

item System.Object

The item being added to the tree view.

Properties

CheckBoxTreeViewItemAddingEventArgs.IsChecked Property

Gets or sets a value indicating whether the check box associated with the tree view item is checked. Setting this value marks the event as handled.

public System.Nullable<bool> IsChecked { get; set; }

Property Value

System.Nullable<System.Boolean>

ControlWorker<TControl> Class

Provides an abstract base implementation for a worker that manages a specific type of WPF control.

public abstract class ControlWorker<TControl> : DiGi.UI.WPF.Classes.VisualWorker
    where TControl : System.Windows.Controls.Control

Type parameters

TControl

The type of the WPF control this worker operates on, which must derive from System.Windows.Controls.Control.

Inheritance System.Object → VisualWorker → ControlWorker<TControl>

Derived
↳ ProgressBarControlWorker

Constructors

ControlWorker(TControl) Constructor

Initializes a new instance of the ControlWorker<TControl> class.

public ControlWorker(TControl control);

Parameters

control TControl

The System.Windows.Controls.Control instance to be associated with this worker.

Fields

ControlWorker<TControl>.control Field

The reference to the WPF control instance managed by this worker.

protected TControl control;

Field Value

TControl

DeterminateControlWorker Class

Provides an implementation of a worker that manages determinate progress updates for a ProgressBarControl.

public class DeterminateControlWorker : DiGi.UI.WPF.Classes.ProgressBarControlWorker, DiGi.Core.Interfaces.IDeterminateWorker, DiGi.Core.Interfaces.IWorker

Inheritance System.Object → VisualWorker → DiGi.UI.WPF.Classes.ControlWorker<ProgressBarControl> → ProgressBarControlWorker → DeterminateControlWorker

Implements DiGi.Core.Interfaces.IDeterminateWorker, DiGi.Core.Interfaces.IWorker

Constructors

DeterminateControlWorker(ProgressBarControl) Constructor

Initializes a new instance of the DeterminateControlWorker class.

public DeterminateControlWorker(DiGi.UI.WPF.Controls.ProgressBarControl progressBarControl);

Parameters

progressBarControl ProgressBarControl

The progress bar control to be updated by this worker.

Properties

DeterminateControlWorker.Maximum Property

Gets or sets the maximum value for progress reporting.

public double Maximum { get; set; }

Implements Maximum

Property Value

System.Double

Methods

DeterminateControlWorker.Report(double) Method

Reports a new progress value.

public void Report(double value);

Parameters

value System.Double

The progress value to report.

Implements Report(double)

DeterminateControlWorker.Report(double, string) Method

Reports a new progress value along with a descriptive status message.

public void Report(double value, string text);

Parameters

value System.Double

The progress value to report.

text System.String

The status message to display alongside the progress.

Implements Report(double, string)

DeterminateControlWorker.Run() Method

Starts the execution of the worker and configures the associated control's maximum value.

public override void Run();

DeterminateWindowWorker Class

Provides a window-based worker implementation that supports determinate progress reporting.

public class DeterminateWindowWorker : DiGi.UI.WPF.Classes.ProgressBarWindowWorker, DiGi.Core.Interfaces.IDeterminateWorker, DiGi.Core.Interfaces.IWorker

Inheritance System.Object → VisualWorker → DiGi.UI.WPF.Classes.WindowWorker<ProgressBarWindow> → ProgressBarWindowWorker → DeterminateWindowWorker

Implements DiGi.Core.Interfaces.IDeterminateWorker, DiGi.Core.Interfaces.IWorker

Constructors

DeterminateWindowWorker() Constructor

Initializes a new instance of the DeterminateWindowWorker class.

public DeterminateWindowWorker();

Properties

DeterminateWindowWorker.Maximum Property

Gets or sets the maximum value for progress reporting.

public double Maximum { get; set; }

Implements Maximum

Property Value

System.Double

Methods

DeterminateWindowWorker.Report(double) Method

Reports a new progress value.

public void Report(double value);

Parameters

value System.Double

The progress value to report.

Implements Report(double)

DeterminateWindowWorker.Report(double, string) Method

Reports a new progress value along with a status message.

public void Report(double value, string text);

Parameters

value System.Double

The progress value to report.

text System.String

The status text to display.

Implements Report(double, string)

DeterminateWindowWorker.Run() Method

Executes the worker operation and synchronizes the maximum progress value with the associated window.

public override void Run();

IndeterminateControlWorker Class

Provides an implementation of a worker that handles indeterminate progress updates for a progress bar control.

public class IndeterminateControlWorker : DiGi.UI.WPF.Classes.ProgressBarControlWorker, DiGi.Core.Interfaces.IIndeterminateWorker, DiGi.Core.Interfaces.IWorker

Inheritance System.Object → VisualWorker → DiGi.UI.WPF.Classes.ControlWorker<ProgressBarControl> → ProgressBarControlWorker → IndeterminateControlWorker

Implements DiGi.Core.Interfaces.IIndeterminateWorker, DiGi.Core.Interfaces.IWorker

Constructors

IndeterminateControlWorker(ProgressBarControl) Constructor

Initializes a new instance of the IndeterminateControlWorker class.

public IndeterminateControlWorker(DiGi.UI.WPF.Controls.ProgressBarControl progressBarControl);

Parameters

progressBarControl ProgressBarControl

The progress bar control to be managed by this worker.

Methods

IndeterminateControlWorker.Report(string) Method

Reports a status message for the indeterminate progress operation.

public void Report(string text);

Parameters

text System.String

The text message to report as current progress status.

Implements Report(string)

IndeterminateWindowWorker Class

Provides a worker implementation that manages a window with indeterminate progress.

public class IndeterminateWindowWorker : DiGi.UI.WPF.Classes.ProgressBarWindowWorker, DiGi.Core.Interfaces.IIndeterminateWorker, DiGi.Core.Interfaces.IWorker

Inheritance System.Object → VisualWorker → DiGi.UI.WPF.Classes.WindowWorker<ProgressBarWindow> → ProgressBarWindowWorker → IndeterminateWindowWorker

Implements DiGi.Core.Interfaces.IIndeterminateWorker, DiGi.Core.Interfaces.IWorker

Constructors

IndeterminateWindowWorker() Constructor

Initializes a new instance of the IndeterminateWindowWorker class without specifying an owner window.

public IndeterminateWindowWorker();

IndeterminateWindowWorker(Window) Constructor

Initializes a new instance of the IndeterminateWindowWorker class with a specified owner window.

public IndeterminateWindowWorker(System.Windows.Window? owner);

Parameters

owner System.Windows.Window

The window that owns this worker.

Methods

IndeterminateWindowWorker.Report(string) Method

Reports progress by updating the status text while maintaining an indeterminate state.

public void Report(string text);

Parameters

text System.String

The text to be displayed as the current progress status.

Implements Report(string)

ItemAddingEventArgs Class

Provides data for events that occur when an item is being added.

public abstract class ItemAddingEventArgs : System.EventArgs

Inheritance System.Object → System.EventArgs → ItemAddingEventArgs

Derived
↳ ListBoxItemAddingEventArgs
↳ TreeViewItemAddingEventArgs

Constructors

ItemAddingEventArgs(object) Constructor

Initializes a new instance of the ItemAddingEventArgs class.

public ItemAddingEventArgs(object? item);

Parameters

item System.Object

The item being added.

Properties

ItemAddingEventArgs.Handled Property

Gets a value indicating whether the event has been handled.

public bool Handled { get; }

Property Value

System.Boolean

ItemAddingEventArgs.Item Property

Gets the item being added.

public object? Item { get; }

Property Value

System.Object

ItemAddingEventArgs.Name Property

Gets or sets the name of the item being added. Setting this value marks the event as handled.

public string? Name { get; set; }

Property Value

System.String

ItemPath Class

Represents a hierarchical path to an item.

public class ItemPath : DiGi.Core.Classes.ObjectPath<DiGi.UI.WPF.Classes.ItemPath>

Inheritance System.Object → DiGi.Core.Classes.Object → DiGi.Core.Classes.SerializableObject → DiGi.Core.Classes.ObjectPath<ItemPath> → ItemPath

Constructors

ItemPath(ItemPath) Constructor

Initializes a new instance of the ItemPath class by copying an existing path.

public ItemPath(DiGi.UI.WPF.Classes.ItemPath? path);

Parameters

path ItemPath

The hierarchical path to copy.

ItemPath(string) Constructor

Initializes a new instance of the ItemPath class using the specified name.

public ItemPath(string? name);

Parameters

name System.String

The name of the item path segment.

ItemPath(string, ItemPath) Constructor

Initializes a new instance of the ItemPath class by appending a name to an existing path.

public ItemPath(string? name, DiGi.UI.WPF.Classes.ItemPath? path);

Parameters

name System.String

The name of the item path segment to append.

path ItemPath

The base hierarchical path.

ItemPath(IEnumerable<string>) Constructor

Initializes a new instance of the ItemPath class using a collection of names.

public ItemPath(System.Collections.Generic.IEnumerable<string>? names);

Parameters

names System.Collections.Generic.IEnumerable<System.String>

An enumerable collection of names that define the hierarchical path segments.

ItemPath(JsonObject) Constructor

Initializes a new instance of the ItemPath class from a JSON object.

public ItemPath(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The System.Text.Json.Nodes.JsonObject containing the path data.

Methods

ItemPath.Create(string) Method

Creates a new instance of the ItemPath class.

protected override DiGi.UI.WPF.Classes.ItemPath Create(string? name);

Parameters

name System.String

The name of the item path segment.

Returns

ItemPath
A new ItemPath instance.

ItemPathTreeViewItem Class

Represents a System.Windows.Controls.TreeViewItem that is associated with a specific ItemPath.

public class ItemPathTreeViewItem : System.Windows.Controls.TreeViewItem

Inheritance System.Object → System.Windows.Threading.DispatcherObject → System.Windows.DependencyObject → System.Windows.Media.Visual → System.Windows.UIElement → System.Windows.FrameworkElement → System.Windows.Controls.Control → System.Windows.Controls.ItemsControl → System.Windows.Controls.HeaderedItemsControl → System.Windows.Controls.TreeViewItem → ItemPathTreeViewItem

Constructors

ItemPathTreeViewItem(ItemPath) Constructor

Initializes a new instance of the ItemPathTreeViewItem class.

public ItemPathTreeViewItem(DiGi.UI.WPF.Classes.ItemPath itemPath);

Parameters

itemPath ItemPath

The ItemPath associated with this tree view item.

Properties

ItemPathTreeViewItem.ItemPath Property

Gets the ItemPath associated with this tree view item.

public DiGi.UI.WPF.Classes.ItemPath? ItemPath { get; }

Property Value

ItemPath

ListBoxItemAddingEventArgs Class

Provides data for events that occur when an item is being added to a System.Windows.Controls.ListBox.

public class ListBoxItemAddingEventArgs : DiGi.UI.WPF.Classes.ItemAddingEventArgs

Inheritance System.Object → System.EventArgs → ItemAddingEventArgs → ListBoxItemAddingEventArgs

Constructors

ListBoxItemAddingEventArgs(object) Constructor

Initializes a new instance of the ListBoxItemAddingEventArgs class.

public ListBoxItemAddingEventArgs(object? item);

Parameters

item System.Object

The item that is being added to the System.Windows.Controls.ListBox.

ProgressBarControlWorker Class

Provides a base implementation for worker classes that manage the operational state and updates of a ProgressBarControl.

public abstract class ProgressBarControlWorker : DiGi.UI.WPF.Classes.ControlWorker<DiGi.UI.WPF.Controls.ProgressBarControl>

Inheritance System.Object → VisualWorker → DiGi.UI.WPF.Classes.ControlWorker<ProgressBarControl> → ProgressBarControlWorker

Derived
↳ DeterminateControlWorker
↳ IndeterminateControlWorker

Constructors

ProgressBarControlWorker(ProgressBarControl) Constructor

Initializes a new instance of the ProgressBarControlWorker class.

public ProgressBarControlWorker(DiGi.UI.WPF.Controls.ProgressBarControl progressBarControl);

Parameters

progressBarControl ProgressBarControl

The progress bar control instance that this worker will manage.

Properties

ProgressBarControlWorker.Text Property

Gets or sets the text content displayed in the main label of the associated progress bar control.

public string? Text { get; set; }

Property Value

System.String

ProgressBarWindowWorker Class

Provides functionality to manage and control a ProgressBarWindow from a background worker context.

public class ProgressBarWindowWorker : DiGi.UI.WPF.Classes.WindowWorker<DiGi.UI.WPF.Windows.ProgressBarWindow>

Inheritance System.Object → VisualWorker → DiGi.UI.WPF.Classes.WindowWorker<ProgressBarWindow> → ProgressBarWindowWorker

Derived
↳ DeterminateWindowWorker
↳ IndeterminateWindowWorker

Constructors

ProgressBarWindowWorker() Constructor

Initializes a new instance of the ProgressBarWindowWorker class.

public ProgressBarWindowWorker();

ProgressBarWindowWorker(Window) Constructor

Initializes a new instance of the ProgressBarWindowWorker class with a specified owner window.

public ProgressBarWindowWorker(System.Windows.Window? owner);

Parameters

owner System.Windows.Window

The optional owner window for the progress bar window.

Properties

ProgressBarWindowWorker.Text Property

Gets or sets the text displayed in the main label of the progress bar window.

public string? Text { get; set; }

Property Value

System.String

ToggleCommand Class

Implements the System.Windows.Input.ICommand interface to provide a command that executes a specified action.

public class ToggleCommand : System.Windows.Input.ICommand

Inheritance System.Object → ToggleCommand

Implements System.Windows.Input.ICommand

Constructors

ToggleCommand(Action<object>) Constructor

Initializes a new instance of the ToggleCommand class.

public ToggleCommand(System.Action<object?> execute);

Parameters

execute System.Action<System.Object>

The action to perform when the command is executed.

Methods

ToggleCommand.CanExecute(object) Method

Determines whether the command can execute in its current state.

public bool CanExecute(object? parameter);

Parameters

parameter System.Object

The parameter to check for execution capability.

Implements CanExecute(object)

Returns

System.Boolean
Always returns true, indicating that the command is always available for execution.

ToggleCommand.Execute(object) Method

Executes the command logic.

public void Execute(object? parameter);

Parameters

parameter System.Object

The parameter to pass to the execute action.

Implements Execute(object)

Events

ToggleCommand.CanExecuteChanged Event

Occurs when conditions change that affect whether the command can be executed.

public event EventHandler? CanExecuteChanged;

Implements CanExecuteChanged

Event Type

System.EventHandler

ToggleCommandAsync Class

Provides an asynchronous implementation of the System.Windows.Input.ICommand interface that prevents concurrent execution of the command logic.

public class ToggleCommandAsync : System.Windows.Input.ICommand

Inheritance System.Object → ToggleCommandAsync

Implements System.Windows.Input.ICommand

Constructors

ToggleCommandAsync(Func<object,Task>, Predicate<object>) Constructor

Initializes a new instance of the ToggleCommandAsync class.

public ToggleCommandAsync(System.Func<object?,System.Threading.Tasks.Task> execute, System.Predicate<object?>? canExecute=null);

Parameters

execute System.Func<System.Object,System.Threading.Tasks.Task>

The asynchronous delegate that defines the logic to be executed.

canExecute System.Predicate<System.Object>

An optional predicate that determines whether the command can be executed based on the provided parameter.

Methods

ToggleCommandAsync.CanExecute(object) Method

Determines whether the command can be executed in its current state.

public bool CanExecute(object? parameter);

Parameters

parameter System.Object

The object to pass as a parameter to determine if the command can execute.

Implements CanExecute(object)

Returns

System.Boolean
True if the command is not currently executing and the optional canExecute predicate returns true; otherwise, false.

ToggleCommandAsync.Execute(object) Method

Executes the asynchronous logic associated with this command.

public void Execute(object? parameter);

Parameters

parameter System.Object

The object to pass as a parameter to the execution logic.

Implements Execute(object)

Events

ToggleCommandAsync.CanExecuteChanged Event

Occurs when there is a change in the can-execute status of the command.

public event EventHandler? CanExecuteChanged;

Implements CanExecuteChanged

Event Type

System.EventHandler

TreeViewItemAddingEventArgs Class

Provides data for events that occur when an item is being added to a tree view.

public class TreeViewItemAddingEventArgs : DiGi.UI.WPF.Classes.ItemAddingEventArgs

Inheritance System.Object → System.EventArgs → ItemAddingEventArgs → TreeViewItemAddingEventArgs

Derived
↳ CheckBoxTreeViewItemAddingEventArgs

Constructors

TreeViewItemAddingEventArgs(object) Constructor

Initializes a new instance of the TreeViewItemAddingEventArgs class.

public TreeViewItemAddingEventArgs(object? item);

Parameters

item System.Object

The item that is being added to the tree view.

Properties

TreeViewItemAddingEventArgs.Path Property

Gets or sets the path associated with the tree view item. Setting this property creates a clone of the provided path and marks the event as handled.

public DiGi.UI.WPF.Classes.ItemPath? Path { get; set; }

Property Value

ItemPath

ValueTreeViewItem Class

Represents a tree view item that encapsulates an underlying value.

public class ValueTreeViewItem : System.Windows.Controls.TreeViewItem

Inheritance System.Object → System.Windows.Threading.DispatcherObject → System.Windows.DependencyObject → System.Windows.Media.Visual → System.Windows.UIElement → System.Windows.FrameworkElement → System.Windows.Controls.Control → System.Windows.Controls.ItemsControl → System.Windows.Controls.HeaderedItemsControl → System.Windows.Controls.TreeViewItem → ValueTreeViewItem

Constructors

ValueTreeViewItem(object) Constructor

Initializes a new instance of the ValueTreeViewItem class with the specified value.

public ValueTreeViewItem(object? value);

Parameters

value System.Object

The underlying value to be associated with this tree view item.

Properties

ValueTreeViewItem.Value Property

Gets the underlying value associated with this tree view item.

public object? Value { get; }

Property Value

System.Object

VisualBackgroundTask Class

A non-generic implementation of VisualBackgroundTask<TBackgroundTask> using the base DiGi.Core.Interfaces.IBackgroundTask interface.

public class VisualBackgroundTask : DiGi.UI.WPF.Classes.VisualBackgroundTask<DiGi.Core.Interfaces.IBackgroundTask>

Inheritance System.Object → DiGi.UI.WPF.Classes.VisualBackgroundTask<DiGi.Core.Interfaces.IBackgroundTask> → VisualBackgroundTask

Constructors

VisualBackgroundTask(IBackgroundTask, string, string) Constructor

Initializes a new instance of the VisualBackgroundTask class.

public VisualBackgroundTask(DiGi.Core.Interfaces.IBackgroundTask backgroundTask, string name, string description);

Parameters

backgroundTask DiGi.Core.Interfaces.IBackgroundTask

The background task instance to be wrapped.

name System.String

The display name of the background task.

description System.String

A detailed description of the background task.

VisualBackgroundTask<TBackgroundTask> Class

Provides a visual wrapper for a background task, enabling integration with WPF UI components and providing properties for monitoring execution status and time.

public class VisualBackgroundTask<TBackgroundTask> : DiGi.UI.WPF.Interfaces.IVisualBackgroundTask, DiGi.UI.WPF.Interfaces.IWPFObject, DiGi.Core.Interfaces.IObject, System.ComponentModel.INotifyPropertyChanged, DiGi.Core.Interfaces.INamedObject, DiGi.Core.Interfaces.IDescribableObject
    where TBackgroundTask : DiGi.Core.Interfaces.IBackgroundTask

Type parameters

TBackgroundTask

The type of the background task, which must implement DiGi.Core.Interfaces.IBackgroundTask.

Inheritance System.Object → VisualBackgroundTask<TBackgroundTask>

Derived
↳ VisualBackgroundTask
↳ VisualReportableBackgroundTask<T,TReportableBackgroundTask>

Implements IVisualBackgroundTask, IWPFObject, DiGi.Core.Interfaces.IObject, System.ComponentModel.INotifyPropertyChanged, DiGi.Core.Interfaces.INamedObject, DiGi.Core.Interfaces.IDescribableObject

Constructors

VisualBackgroundTask(TBackgroundTask, string, string) Constructor

Initializes a new instance of the VisualBackgroundTask<TBackgroundTask> class.

public VisualBackgroundTask(TBackgroundTask backgroundTask, string name, string description);

Parameters

backgroundTask TBackgroundTask

The background task instance to be wrapped.

name System.String

The display name of the background task.

description System.String

A detailed description of the background task.

Properties

VisualBackgroundTask<TBackgroundTask>.CanToggle Property

Gets a value indicating whether the background task can currently be toggled (started or stopped).

public bool CanToggle { get; }

Property Value

System.Boolean

VisualBackgroundTask<TBackgroundTask>.Description Property

Gets the description of the background task.

public string? Description { get; }

Implements Description

Property Value

System.String

VisualBackgroundTask<TBackgroundTask>.ExceptionText Property

Gets the exception message that caused the task to fail, or null if no exception occurred.

public string? ExceptionText { get; }

Property Value

System.String

VisualBackgroundTask<TBackgroundTask>.ExecutionTimeSpanText Property

Gets the total execution time of the task formatted as a string in "HH:mm:ss" format.

public string ExecutionTimeSpanText { get; }

Property Value

System.String

VisualBackgroundTask<TBackgroundTask>.Name Property

Gets the display name of the background task.

public string? Name { get; }

Implements Name

Property Value

System.String

VisualBackgroundTask<TBackgroundTask>.Status Property

Gets the current status description of the background task.

public virtual string Status { get; }

Property Value

System.String

VisualBackgroundTask<TBackgroundTask>.ToggleCommandAsync Property

Gets the command used to asynchronously toggle the execution state of the background task.

public System.Windows.Input.ICommand ToggleCommandAsync { get; }

Property Value

System.Windows.Input.ICommand

VisualBackgroundTask<TBackgroundTask>.ToggleText Property

Gets the text to be displayed on the toggle button, indicating whether the next action is to "Start" or "Stop".

public string ToggleText { get; }

Property Value

System.String

VisualBackgroundTask<TBackgroundTask>.TypeName Property

Gets the name of the type of the underlying background task.

public string? TypeName { get; }

Implements TypeName

Property Value

System.String

Methods

VisualBackgroundTask<TBackgroundTask>.Start() Method

Starts the execution of the background task if it is not already running.

public void Start();

Implements Start()

Events

VisualBackgroundTask<TBackgroundTask>.PropertyChanged Event

Occurs when a property value changes.

public event PropertyChangedEventHandler? PropertyChanged;

Implements PropertyChanged

Event Type

System.ComponentModel.PropertyChangedEventHandler

VisualReportableBackgroundTask<T,TReportableBackgroundTask> Class

A visual representation of a reportable background task that tracks and displays reported values.

public class VisualReportableBackgroundTask<T,TReportableBackgroundTask> : DiGi.UI.WPF.Classes.VisualBackgroundTask<TReportableBackgroundTask>
    where TReportableBackgroundTask : DiGi.Core.Interfaces.IReportableBackgroundTask<T>

Type parameters

T

The type of the progress data reported by the background task.

TReportableBackgroundTask

The specific type of the reportable background task implementation.

Inheritance System.Object → DiGi.UI.WPF.Classes.VisualBackgroundTask<TReportableBackgroundTask> → VisualReportableBackgroundTask<T,TReportableBackgroundTask>

Derived
↳ VisualReportableBackgroundTask<T>

Constructors

VisualReportableBackgroundTask(TReportableBackgroundTask, string, string) Constructor

Initializes a new instance of the VisualReportableBackgroundTask<T,TReportableBackgroundTask> class.

public VisualReportableBackgroundTask(TReportableBackgroundTask reportableBackgroundTask, string name, string description);

Parameters

reportableBackgroundTask TReportableBackgroundTask

The reportable background task to be visually tracked.

name System.String

The display name of the task.

description System.String

A description of the task.

Properties

VisualReportableBackgroundTask<T,TReportableBackgroundTask>.Status Property

Gets the status of the background task, appended with the current reported value if the task is running and the value is a non-empty string.

public override string Status { get; }

Property Value

System.String

VisualReportableBackgroundTask<T,TReportableBackgroundTask>.Value Property

Gets or sets the current value reported by the background task.

public T? Value { get; set; }

Property Value

T

VisualReportableBackgroundTask<T> Class

A visual representation of a reportable background task using the generic DiGi.Core.Interfaces.IReportableBackgroundTask<> interface.

public class VisualReportableBackgroundTask<T> : DiGi.UI.WPF.Classes.VisualReportableBackgroundTask<T, DiGi.Core.Interfaces.IReportableBackgroundTask<T>>

Type parameters

T

The type of the progress data reported by the background task.

Inheritance System.Object → DiGi.UI.WPF.Classes.VisualBackgroundTask<DiGi.Core.Interfaces.IReportableBackgroundTask<T>> → DiGi.UI.WPF.Classes.VisualReportableBackgroundTask<T,DiGi.Core.Interfaces.IReportableBackgroundTask<T>> → VisualReportableBackgroundTask<T>

Constructors

VisualReportableBackgroundTask(IReportableBackgroundTask<T>, string, string) Constructor

Initializes a new instance of the VisualReportableBackgroundTask<T> class.

public VisualReportableBackgroundTask(DiGi.Core.Interfaces.IReportableBackgroundTask<T> reportableBackgroundTask, string name, string description);

Parameters

reportableBackgroundTask DiGi.Core.Interfaces.IReportableBackgroundTask<T>

The reportable background task to be visually tracked.

name System.String

The display name of the task.

description System.String

A description of the task.

VisualWorker Class

Provides an abstract base implementation of a visual worker that wraps a System.ComponentModel.BackgroundWorker to handle asynchronous operations.

public abstract class VisualWorker : DiGi.UI.WPF.Interfaces.IVisualWorker, DiGi.UI.WPF.Interfaces.IWPFObject, DiGi.Core.Interfaces.IObject, DiGi.Core.Interfaces.IWorker

Inheritance System.Object → VisualWorker

Derived
↳ ControlWorker<TControl>
↳ WindowWorker<TWindow>

Implements IVisualWorker, IWPFObject, DiGi.Core.Interfaces.IObject, DiGi.Core.Interfaces.IWorker

Constructors

VisualWorker() Constructor

Initializes a new instance of the VisualWorker class and attaches internal handlers to the background worker's events.

public VisualWorker();

Properties

VisualWorker.IsBusy Property

Gets a value indicating whether the worker is currently busy.

public bool IsBusy { get; }

Implements IsBusy

Property Value

System.Boolean

Methods

VisualWorker.Run() Method

Starts the asynchronous execution of the background worker.

public virtual void Run();

Events

VisualWorker.DoWork Event

Occurs when the background worker begins its operation.

public event DoWorkEventHandler? DoWork;

Event Type

System.ComponentModel.DoWorkEventHandler

VisualWorker.RunWorkerCompleted Event

Occurs when the background worker completes its operation.

public event RunWorkerCompletedEventHandler? RunWorkerCompleted;

Event Type

System.ComponentModel.RunWorkerCompletedEventHandler

WindowWorker<TWindow> Class

Provides an abstract base implementation for a worker that manages the lifecycle and display of a WPF window.

public abstract class WindowWorker<TWindow> : DiGi.UI.WPF.Classes.VisualWorker
    where TWindow : System.Windows.Window

Type parameters

TWindow

The type of the window managed by this worker, which must derive from System.Windows.Window.

Inheritance System.Object → VisualWorker → WindowWorker<TWindow>

Derived
↳ CancellableProgressBarWindowWorker
↳ ProgressBarWindowWorker

Constructors

WindowWorker() Constructor

Initializes a new instance of the WindowWorker<TWindow> class.

public WindowWorker();

WindowWorker(TWindow) Constructor

Initializes a new instance of the WindowWorker<TWindow> class with a specified window.

public WindowWorker(TWindow? window);

Parameters

window TWindow

The window instance to be managed by this worker.

Properties

WindowWorker<TWindow>.Owner Property

Gets or sets the owner of the managed window.

public System.Windows.Window? Owner { get; set; }

Property Value

System.Windows.Window
The System.Windows.Window that owns the managed window, or null if no owner is set.

Methods

WindowWorker<TWindow>.Run() Method

Executes the worker's logic and invokes the display of the managed window on the UI thread.

public override void Run();

Clone this wiki locally