26 lines
722 B
C#
26 lines
722 B
C#
|
|
using System.Windows.Controls;
|
||
|
|
using EngineeringSync.Setup.ViewModels;
|
||
|
|
|
||
|
|
namespace EngineeringSync.Setup.Views.Pages;
|
||
|
|
|
||
|
|
/// <summary>
|
||
|
|
/// Basisklasse für alle Wizard-Seiten.
|
||
|
|
/// Stellt gemeinsame WizardViewModel-Referenz und Validierungsschnittstelle bereit.
|
||
|
|
/// </summary>
|
||
|
|
public abstract class WizardPageBase : UserControl
|
||
|
|
{
|
||
|
|
protected WizardViewModel Wizard { get; }
|
||
|
|
|
||
|
|
protected WizardPageBase(WizardViewModel wizard)
|
||
|
|
{
|
||
|
|
Wizard = wizard;
|
||
|
|
DataContext = wizard.State;
|
||
|
|
}
|
||
|
|
|
||
|
|
/// <summary>
|
||
|
|
/// Wird vor dem Vorwärtsnavigieren aufgerufen.
|
||
|
|
/// Gibt false zurück um die Navigation zu blockieren (z.B. Validierungsfehler).
|
||
|
|
/// </summary>
|
||
|
|
public virtual bool Validate() => true;
|
||
|
|
}
|