Last Updated: 31 May 2021 08:02 by ADMIN
Release LIB 2020.1.203 (02/03/2020)
Martin Ivanov
Created on: 22 Nov 2019 14:48
Category: Wizard
Type: Bug Report
Wizard: Data context of FooterTemplate is not updated when the DataContext of WizardPage changes run-time

If you change the DataContext property of WizardPage at run-time, the context in the content presenter that shows the footer is not updated accordingly. 

To work this around you can create a custom WizardPage and manually set the data context of the footer presenter.

public class CustomWizardPage : WizardPage
	private ContentControl footerContentControl;

	public override void OnApplyTemplate()
		this.footerContentControl = this.GetTemplateChild("PART_FooterContentControl") as ContentControl;            
		this.DataContextChanged += CustomWizardPage_DataContextChanged;            

	private void CustomWizardPage_DataContextChanged(object sender, DependencyPropertyChangedEventArgs e)
		this.footerContentControl.Content = e.NewValue;

	<local:CustomWizardPage />