AeroWizard WizardPages as Separate XAML files

Wizard for WPF Forum

Posted 13 years ago by Brad Lefferdink
Version: 11.1.0543
Avatar
Ok, I want to be able to provide my users the type of Wizard that is native to their OS so I plan on using a AeroWizard for users with Vista and 7, and Wizard97 for XP. However, I've noticed that after building all my pages as separate XAML files, that for whatever reason when I bring them into the AeroWizard they are styled like Wizard97 pages, instead of getting the nice white background, nicely styled blue caption.

Am I doing something wrong? I can't see where I'm specifying a specific style anywhere and I can't see in the examples or in the templated AeroWizard window and wizard that the pages are inheriting a given style...

XAML for AeroWizard:


<Window x:Class="<myInternalNamespace>.NewCustomer.NewCustomerWizard97"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:shared="http://schemas.actiprosoftware.com/winfx/xaml/shared"
    xmlns:wizard="http://schemas.actiprosoftware.com/winfx/xaml/wizard"
        xmlns:wizardPages_NewCustomer="clr-namespace:<myIntenalNamespace>.NewCustomer"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        mc:Ignorable="d" 
        Title="New Customer Wizard"
    Width="850" MinHeight="450" SizeToContent="Height" ResizeMode="NoResize"  d:DesignHeight="567" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" WindowStyle="SingleBorderWindow" WindowStartupLocation="CenterOwner">
    
    <Window.Resources>
        <DataTemplate x:Key="CheckboxItemTemplate">
            <StackPanel Orientation="Horizontal" Margin="1" Background="Transparent">
                <CheckBox IsChecked="{Binding IsChecked, Mode=TwoWay}" Margin="0 0 0 0" Content="{Binding Description, Mode=OneWay}"
                          Background="Transparent" Foreground="White" Opacity="{Binding ItemOpacity, Mode=OneWay}"/>
            </StackPanel>
        </DataTemplate>
    </Window.Resources>
    
    <wizard:Wizard x:Name="wizard" WindowTitleBehavior="PageTitle" WindowTitleBaseText="New Customer Wizard" PageSequenceType="Stack" HelpButtonVisible="False">
        <wizard:Wizard.TransitionSelector>
            <shared:MultiTransitionSelector>
                <!-- This adds a fade transition -->
                <shared:FadeTransition />
            </shared:MultiTransitionSelector>
        </wizard:Wizard.TransitionSelector>
        
        <wizard:WizardPage x:Name="welcomePage" PageType="Exterior"
                Caption="Welcome to the Add New Company Wizard"
                Description="This wizard will guide you through the steps of setting up a new Company and optionally adding Users.">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="*" />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>

                <TextBlock Grid.Row="1" TextWrapping="Wrap">To continue, click Next.</TextBlock>
            </Grid>
        </wizard:WizardPage>
        
        <wizardPages_NewCustomer:NewCustomer_Info_WizardPage />
                
        <wizardPages_NewCustomer:NewCustomer_PreferencesPermissions_WizardPage />

        <wizard:WizardPage x:Name="finishPage" PageType="Exterior"
                Caption="Company Creation Complete"
                Description="The new company has been sucsessfully created in the database.">
        </wizard:WizardPage>

    </wizard:Wizard>
    
</Window>

Comments (2)

Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Brad,

Perhaps since they are custom classes there is something preventing the Aero style from inheriting down. You can explicitly set the style on a page like this:
Style="{StaticResource {x:Static themes:AeroWizardCommonDictionary.PageStyleKey}}"


Actipro Software Support

Posted 13 years ago by Brad Lefferdink
Avatar
That was it AWESOME. Thanks.
The latest build of this product (v24.1.2) was released 11 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.