This example demonstrates how to create a simple Wizard with predefined pages.
Wizard control includes the following built-in page types:
- WelcomeWizardPage
- WizardPage
- CompletionWizardPage
These pages have the same functionality, and only their button and content region visibility settings are different. To show/hide page buttons, use the following properties:
Files to Look At
Documentation
More Examples
Does this example address your development requirements/objectives?
(you will be redirected to DevExpress.com to submit your response)
Example Code
XAML<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:dxco="http://schemas.devexpress.com/winfx/2008/xaml/controls"
x:Class="WizardControlExample.MainWindow"
Title="MainWindow" Height="350" Width="525">
<Grid>
<dxco:Wizard Cancel="Wizard_Cancel" AnimationType="Fade">
<dxco:WelcomeWizardPage HeaderBackground="AliceBlue" Header="Header">
<dxco:WelcomeWizardPage.SideContent>
<Border Background="Cornsilk">
<TextBlock Text="Side content" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="3"/>
</Border>
</dxco:WelcomeWizardPage.SideContent>
<TextBlock Text="Content" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</dxco:WelcomeWizardPage>
<dxco:WizardPage>
<TextBlock Text="Some page" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</dxco:WizardPage>
<dxco:CompletionWizardPage ShowBack="False" ShowCancel="False">
<TextBlock Text="Finish" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</dxco:CompletionWizardPage>
</dxco:Wizard>
</Grid>
</Window>
C#using System;
using System.Linq;
using System.Windows;
using DevExpress.Xpf.Core;
namespace WizardControlExample
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}
private void Wizard_Cancel(object sender, System.ComponentModel.CancelEventArgs e)
{
e.Cancel = (DXMessageBox.Show("Cancel installation and close wizard?", "Confirmation", MessageBoxButton.YesNo) == MessageBoxResult.No);
}
}
}