Made the TPageEnumeration a value type so the multi page view model can start out with 'null' and switch to the initial page after the main window loads

This commit is contained in:
Markus Ewald 2026-04-28 09:31:04 +02:00 committed by Markus Ewald
commit 7d98ba1e0d
3 changed files with 17 additions and 10 deletions

View file

@ -24,8 +24,11 @@ using Nuclex.Avalonia.Commands;
namespace Nuclex.Avalonia.ViewModels {
/// <summary>Interface for view models that can switch between different pages</summary>
/// <typeparam name="TPageEnumeration">Enum type by which pages can be indicated</typeparam>
public interface IMultiPageViewModel<TPageEnumeration> {
/// <typeparam name="TPageEnumeration">
/// Type by which pages can be indicated (typically an enum)
/// </typeparam>
public interface IMultiPageViewModel<TPageEnumeration>
where TPageEnumeration : struct {
/// <summary>Command to switch the active tool page</summary>
IAsyncCommand<TPageEnumeration> SwitchPageCommand { get; }