Change buton style in wizard

Wizard for WPF Forum

Posted 4 years ago by vijay d
Version: 19.1.0683
Avatar

Hi,

I want to change the button styles(cancel/back/finish) in wizard. And i dont want to show all buttons in every step. Guide me to achive this.

Comments (5)

Posted 4 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

The buttons don't have a custom Style applied.  To change the button styles you could put an implicit Style that targets the Button type in the Wizard.Resources.

Their visibility is controlled via properties on each WizardPage, like CancelButtonVisibility, etc.


Actipro Software Support

Posted 4 years ago by vijay d
Avatar

i wan different style for each buttons. how to target the specific buttons?

Posted 4 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

For that level of extensibility, you would need to clone our default WizardButtonContainer control's Style/Template and make an implicit Style for it with a customized template in your App or Wizard's Resources. 

The default style is::

<Style TargetType="wizard:WizardButtonContainer">
	<Setter Property="Background" Value="{DynamicResource {x:Static themes:AssetResourceKeys.ContainerMediumBackgroundNormalBrushKey}}" />
	<Setter Property="BorderBrush" Value="{DynamicResource {x:Static themes:AssetResourceKeys.ContainerBorderNormalBrushKey}}" />
	<Setter Property="BorderThickness" Value="0,1,0,0" />
	<Setter Property="Padding" Value="7" />
	<Setter Property="Template">
		<Setter.Value>
			<ControlTemplate TargetType="wizard:WizardButtonContainer">
				<Border Background="{TemplateBinding Background}"
						BorderBrush="{TemplateBinding BorderBrush}"
						BorderThickness="{TemplateBinding BorderThickness}"
						Padding="{TemplateBinding Padding}"
						SnapsToDevicePixels="True">
					<DockPanel>
						<Button x:Name="PART_HelpButton" DockPanel.Dock="Left" MinWidth="75" Command="wizard:WizardCommands.Help"
							Content="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=wizard:Wizard}, Path=HelpButtonText}" 
							Visibility="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=wizard:Wizard}, Path=(wizard:Wizard.SelectedPage).(wizard:WizardPage.HelpButtonVisibility)}" />
						<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
							<Button x:Name="PART_CancelButton" Margin="0,0,7,0" MinWidth="75" Command="wizard:WizardCommands.Cancel" 
								Content="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=wizard:Wizard}, Path=CancelButtonText}" 
								Visibility="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=wizard:Wizard}, Path=(wizard:Wizard.SelectedPage).(wizard:WizardPage.CancelButtonVisibility)}" />
							<Button x:Name="PART_BackButton" MinWidth="75" Command="wizard:WizardCommands.PreviousPage" 
								Content="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=wizard:Wizard}, Path=BackButtonText}" 
								Visibility="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=wizard:Wizard}, Path=(wizard:Wizard.SelectedPage).(wizard:WizardPage.BackButtonVisibility)}" />
							<Button x:Name="PART_NextButton" MinWidth="75" Command="wizard:WizardCommands.NextPage"
								Content="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=wizard:Wizard}, Path=NextButtonText}" 
								Visibility="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=wizard:Wizard}, Path=(wizard:Wizard.SelectedPage).(wizard:WizardPage.NextButtonVisibility)}" />
							<Button x:Name="PART_FinishButton" Margin="7,0,0,0" MinWidth="75" Command="wizard:WizardCommands.Finish" 
								Content="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=wizard:Wizard}, Path=FinishButtonText}" 
								Visibility="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=wizard:Wizard}, Path=(wizard:Wizard.SelectedPage).(wizard:WizardPage.FinishButtonVisibility)}" />
						</StackPanel>
					</DockPanel>
				</Border>
			</ControlTemplate>
		</Setter.Value>
	</Setter>
</Style>


Actipro Software Support

Posted 4 years ago by vijay d
Avatar

How to change the wizard page template. I don't want the caption and description and I want to remove place holders for them. AND HOW TO CREATE CUSTOM TEMPLATE FOR WIZARD PAGE.

Posted 4 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

Please read the "Page Types" topic in the documentation that comes with the product.  That talks about the "Blank" page type that is likely what you want.


Actipro Software Support

The latest build of this product (v24.1.1) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.