Wizard
Activating the navigation events (switch page, pressing the button Finish or Cancel):
public override void Opened()
{
base.Opened();
wiz.WizardSelectionChanged += wiz_WizardSelectionChanged;
wiz.WizardFinished += wiz_WizardFinished;
wiz.WizardCanceled += wiz_WizardCanceled;
wizSessionSelect.LeaveCurrentPage += wizSessionSelect_LeaveCurrentPage;
//....
}
private void wiz_WizardCanceled(object sender, DataEventArgs<object> e)
{
BusObj.Reset();
if (wiz.SelectedItem == wizSessionSelect)
{
this.Close();
}
//....
}
private void wizSessionSelect_LeaveCurrentPage(object sender, DataEventArgs<object> e)
{
BusObj.InitInventur(lginventur_id.SelectedValue.ToStringNN(), lginv_zaehlg_nr.SelectedValue.ToInt(0));
}
Switching pages programmatically:
if (wiz.SelectedItem == wizGebindeEdit)
{
this.InitArtikelEdit();
wizGebindeEdit.IsFinishVisible = true;
//button is valid and IsBackValid = true, but previous pages are disabled when moving to page3 (internal flag)
//so we need to change it to false and then back to true (the change has to be detected)
//wizGebindeEdit.IsBackValid = true;
wizGebindeEdit.IsBackValid = false;
wizGebindeEdit2.IsCurrentValid = true;
}
Activating Finish button in another page than the last one:
//Atm the finish button is not related to a page, but to the wizard control!
wizGebindeEdit.IsFinishVisible = true;
Last updated