You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
298 lines
13 KiB
298 lines
13 KiB
<!--***********************************************************************************
|
|
|
|
Extended WPF Toolkit
|
|
|
|
Copyright (C) 2007-2013 Xceed Software Inc.
|
|
|
|
This program is provided to you under the terms of the Microsoft Public
|
|
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
|
|
|
|
For more features, controls, and fast professional support,
|
|
pick up the Plus Edition at http://xceed.com/wpf_toolkit
|
|
|
|
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
|
|
|
|
**********************************************************************************-->
|
|
|
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:local="clr-namespace:Xceed.Wpf.Toolkit"
|
|
xmlns:conv="clr-namespace:Xceed.Wpf.Toolkit.Core.Converters">
|
|
|
|
<conv:WizardPageButtonVisibilityConverter x:Key="WizardPageButtonVisibilityConverter" />
|
|
|
|
<Style TargetType="{x:Type local:Wizard}">
|
|
<Setter Property="Background"
|
|
Value="#F0F0F0" />
|
|
<Setter Property="BorderBrush"
|
|
Value="#A0A0A0" />
|
|
<Setter Property="BorderThickness"
|
|
Value="1" />
|
|
<Setter Property="ItemsPanel">
|
|
<Setter.Value>
|
|
<ItemsPanelTemplate>
|
|
<Grid />
|
|
</ItemsPanelTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type local:Wizard}">
|
|
<Border Background="{TemplateBinding Background}"
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
Padding="{TemplateBinding Padding}">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="*" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<ContentPresenter Content="{Binding CurrentPage, RelativeSource={RelativeSource TemplatedParent}}" />
|
|
|
|
<Border Grid.Row="1"
|
|
BorderBrush="#A0A0A0"
|
|
BorderThickness="0,1,0,0"
|
|
Padding="7">
|
|
<StackPanel>
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
<Button Name="HelpButton"
|
|
Grid.Column="0"
|
|
MinWidth="75"
|
|
Command="local:WizardCommands.Help"
|
|
Content="{TemplateBinding HelpButtonContent}">
|
|
<Button.Visibility>
|
|
<MultiBinding Converter="{StaticResource WizardPageButtonVisibilityConverter}">
|
|
<Binding RelativeSource="{RelativeSource TemplatedParent}"
|
|
Path="HelpButtonVisibility" />
|
|
<Binding RelativeSource="{RelativeSource TemplatedParent}"
|
|
Path="CurrentPage.HelpButtonVisibility" />
|
|
</MultiBinding>
|
|
</Button.Visibility>
|
|
</Button>
|
|
<StackPanel Grid.Column="1"
|
|
Orientation="Horizontal"
|
|
HorizontalAlignment="Right">
|
|
<Button Name="BackButton"
|
|
MinWidth="75"
|
|
Command="local:WizardCommands.PreviousPage"
|
|
Content="{TemplateBinding BackButtonContent}">
|
|
<Button.Visibility>
|
|
<MultiBinding Converter="{StaticResource WizardPageButtonVisibilityConverter}">
|
|
<Binding RelativeSource="{RelativeSource TemplatedParent}"
|
|
Path="BackButtonVisibility" />
|
|
<Binding RelativeSource="{RelativeSource TemplatedParent}"
|
|
Path="CurrentPage.BackButtonVisibility" />
|
|
</MultiBinding>
|
|
</Button.Visibility>
|
|
</Button>
|
|
<Grid MinWidth="75"
|
|
Margin="2,0,0,0">
|
|
<Button Name="NextButton"
|
|
Command="local:WizardCommands.NextPage"
|
|
Content="{TemplateBinding NextButtonContent}">
|
|
<Button.Visibility>
|
|
<MultiBinding Converter="{StaticResource WizardPageButtonVisibilityConverter}">
|
|
<Binding RelativeSource="{RelativeSource TemplatedParent}"
|
|
Path="NextButtonVisibility" />
|
|
<Binding RelativeSource="{RelativeSource TemplatedParent}"
|
|
Path="CurrentPage.NextButtonVisibility" />
|
|
</MultiBinding>
|
|
</Button.Visibility>
|
|
</Button>
|
|
<Button Name="FinishButton"
|
|
Command="local:WizardCommands.Finish"
|
|
Content="{TemplateBinding FinishButtonContent}">
|
|
<Button.Visibility>
|
|
<MultiBinding Converter="{StaticResource WizardPageButtonVisibilityConverter}">
|
|
<Binding RelativeSource="{RelativeSource TemplatedParent}"
|
|
Path="FinishButtonVisibility" />
|
|
<Binding RelativeSource="{RelativeSource TemplatedParent}"
|
|
Path="CurrentPage.FinishButtonVisibility" />
|
|
</MultiBinding>
|
|
</Button.Visibility>
|
|
</Button>
|
|
</Grid>
|
|
<Button Name="CancelButton"
|
|
Margin="7,0,0,0"
|
|
MinWidth="75"
|
|
Command="local:WizardCommands.Cancel"
|
|
Content="{TemplateBinding CancelButtonContent}">
|
|
<Button.Visibility>
|
|
<MultiBinding Converter="{StaticResource WizardPageButtonVisibilityConverter}">
|
|
<Binding RelativeSource="{RelativeSource TemplatedParent}"
|
|
Path="CancelButtonVisibility" />
|
|
<Binding RelativeSource="{RelativeSource TemplatedParent}"
|
|
Path="CurrentPage.CancelButtonVisibility" />
|
|
</MultiBinding>
|
|
</Button.Visibility>
|
|
</Button>
|
|
</StackPanel>
|
|
</Grid>
|
|
</StackPanel>
|
|
</Border>
|
|
</Grid>
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsEnabled"
|
|
Value="True"
|
|
SourceName="FinishButton">
|
|
<Setter Property="Visibility"
|
|
Value="Visible"
|
|
TargetName="FinishButton" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<ControlTemplate x:Key="BlankWizardPageTemplate"
|
|
TargetType="{x:Type local:WizardPage}">
|
|
<Border SnapsToDevicePixels="true"
|
|
Background="{TemplateBinding Background}"
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
BorderBrush="{TemplateBinding BorderBrush}">
|
|
<Grid Background="{TemplateBinding Background}">
|
|
<ContentPresenter Margin="14"
|
|
Content="{TemplateBinding Content}"
|
|
ContentTemplate="{TemplateBinding ContentTemplate}"
|
|
ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}" />
|
|
</Grid>
|
|
</Border>
|
|
</ControlTemplate>
|
|
|
|
<ControlTemplate x:Key="ExteriorWizardPageTemplate"
|
|
TargetType="{x:Type local:WizardPage}">
|
|
<Grid Background="{TemplateBinding Background}">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
<Border SnapsToDevicePixels="true"
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
BorderBrush="{TemplateBinding BorderBrush}">
|
|
<Grid Grid.Column="0"
|
|
Background="{TemplateBinding ExteriorPanelBackground}"
|
|
MinWidth="{Binding ExteriorPanelMinWidth, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:Wizard}}">
|
|
<ContentControl Content="{TemplateBinding ExteriorPanelContent}" />
|
|
</Grid>
|
|
</Border>
|
|
<Grid Column="1"
|
|
Margin="14">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
<TextBlock Grid.Row="0"
|
|
TextWrapping="Wrap"
|
|
Margin="0,0,0,14"
|
|
FontSize="16"
|
|
FontWeight="Bold"
|
|
Text="{TemplateBinding Title}" >
|
|
</TextBlock>
|
|
<TextBlock Grid.Row="1"
|
|
TextWrapping="Wrap"
|
|
Margin="0,0,0,14"
|
|
Text="{TemplateBinding Description}" >
|
|
</TextBlock>
|
|
<ContentPresenter Grid.Row="2"
|
|
Content="{TemplateBinding Content}"
|
|
ContentTemplate="{TemplateBinding ContentTemplate}"
|
|
ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}" />
|
|
</Grid>
|
|
</Grid>
|
|
</ControlTemplate>
|
|
|
|
<ControlTemplate x:Key="InteriorWizardPageTemplate"
|
|
TargetType="{x:Type local:WizardPage}">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<Grid Background="{TemplateBinding HeaderBackground}"
|
|
MinHeight="56">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<StackPanel>
|
|
<TextBlock Margin="16,9,0,1"
|
|
TextWrapping="Wrap"
|
|
FontWeight="Bold"
|
|
Text="{TemplateBinding Title}" >
|
|
</TextBlock>
|
|
<TextBlock Margin="32,0,0,3"
|
|
TextWrapping="Wrap"
|
|
Text="{TemplateBinding Description}" >
|
|
</TextBlock>
|
|
</StackPanel>
|
|
<Image Grid.Column="1"
|
|
Margin="4"
|
|
Source="{TemplateBinding HeaderImage}"
|
|
Stretch="None"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center" >
|
|
</Image>
|
|
</Grid>
|
|
|
|
<Border Grid.Row="1"
|
|
SnapsToDevicePixels="true"
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
BorderBrush="{TemplateBinding BorderBrush}">
|
|
<Grid Background="{TemplateBinding Background}">
|
|
<ContentPresenter Margin="14"
|
|
Content="{TemplateBinding Content}"
|
|
ContentTemplate="{TemplateBinding ContentTemplate}"
|
|
ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}" />
|
|
</Grid>
|
|
</Border>
|
|
</Grid>
|
|
</ControlTemplate>
|
|
|
|
<Style TargetType="{x:Type local:WizardPage}">
|
|
<Style.Triggers>
|
|
<Trigger Property="PageType"
|
|
Value="Blank">
|
|
<Setter Property="Background"
|
|
Value="#FFF0F0F0" />
|
|
<Setter Property="BorderThickness"
|
|
Value="0" />
|
|
<Setter Property="Template"
|
|
Value="{StaticResource BlankWizardPageTemplate}" />
|
|
</Trigger>
|
|
<Trigger Property="PageType"
|
|
Value="Exterior">
|
|
<Setter Property="Background"
|
|
Value="#FFFFFF" />
|
|
<Setter Property="BorderThickness"
|
|
Value="0" />
|
|
<Setter Property="ExteriorPanelBackground"
|
|
Value="#E3EFFF" />
|
|
<Setter Property="Template"
|
|
Value="{StaticResource ExteriorWizardPageTemplate}" />
|
|
</Trigger>
|
|
<Trigger Property="PageType"
|
|
Value="Interior">
|
|
<Setter Property="Background"
|
|
Value="#FFF0F0F0" />
|
|
<Setter Property="BorderBrush"
|
|
Value="{x:Static SystemColors.ActiveBorderBrush}" />
|
|
<Setter Property="BorderThickness"
|
|
Value="0,1,0,0" />
|
|
<Setter Property="HeaderBackground"
|
|
Value="#FFFFFF" />
|
|
<Setter Property="Template"
|
|
Value="{StaticResource InteriorWizardPageTemplate}" />
|
|
</Trigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
|
|
</ResourceDictionary>
|
|
|