This is a migrated thread and some comments may be shown as answers.

Wizard does not show subclassed WizardPage

2 Answers 78 Views
Wizard
This is a migrated thread and some comments may be shown as answers.
Hillin
Top achievements
Rank 1
Hillin asked on 28 Dec 2018, 12:22 PM

Hi,

I'm running into this problem: I have a Wizard with some pages. If I place these pages directly into the Wizard in XAML, everything works well. However, as I wanted to manage the pages in a cleaner manner, I created and designed each page like a UserControl - I create a UserControl, change its base class to telerik:WizardPage, and design the page in it. Unfortunately pages created this way does not show in the Wizard.

Is this a bug or by design? What's the best practice to manage a Wizard with many pages, with each of which has its own complex logic?

2 Answers, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 31 Dec 2018, 07:34 AM
Hello Hillin,

This behavior would be expected if you use NoXaml dlls. If that's your case you will need to create a style that targets the custom UserControl (deriving from WizardPage) and based it on the default WizardPageStyle. You can read a bit more about this in the Styling Controls article. Here is also an example in code:
<Application.Resources>
  <ResourceDictionary>
    <ResourceDictionary.MergedDictionaries>
      <ResourceDictionary Source="Themes/System.Windows.xaml" />
      <ResourceDictionary Source="Themes/Telerik.Windows.Controls.xaml" />
      <ResourceDictionary Source="Themes/Telerik.Windows.Controls.Navigation.xaml" />
    </ResourceDictionary.MergedDictionaries>
    <Style TargetType="local:MyCustomWizardPageControl" BasedOn="{StaticResource WizardPageStyle}" />
  </ResourceDictionary>
</Application.Resources>

I hope this helps.

Regards,
Martin Ivanov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Hillin
Top achievements
Rank 1
answered on 05 Jan 2019, 12:21 PM
Thanks a lot Martin, your solution worked perfectly.
Tags
Wizard
Asked by
Hillin
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
Hillin
Top achievements
Rank 1
Share this question
or