added samples
[windows-sources.git] / sdk / samples / CrossTechnologySamples / VistaBridge / vistabridgecontrols / themes / generic.xaml
blob07786d5d62577839d012fb3ab4a5f7675977fb50
1 <ResourceDictionary
2     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4     xmlns:v="clr-namespace:Microsoft.SDK.Samples.VistaBridge.Controls"
5     >
6   <Style x:Key="BackButtonStyle" TargetType="{x:Type Button}">
7     <Setter Property="Template">
8       <Setter.Value>
9         <ControlTemplate TargetType="{x:Type Button}">
10           <StackPanel>
11             <Canvas Background="Red">
12               <Image Width="29" Height="26" Name="LeftBackButtonDisabled" Source="pack://application:,,/VistaBridgeControls;component/Images/BackButtons/LeftBackButtonDisabled.png" Opacity="1"/>
13               <Image Width="29" Height="26" Name="LeftBackButtonEnabled" Source="pack://application:,,/VistaBridgeControls;component/Images/BackButtons/LeftBackButtonEnabled.png" Opacity="0"/>
14               <Image Width="29" Height="26" Name="LeftBackButtonHover" Source="pack://application:,,/VistaBridgeControls;component/Images/BackButtons/LeftBackButtonHover.png" Opacity="0"/>
15               <Image Width="29" Height="26" Name="LeftBackButtonPressed" Source="pack://application:,,/VistaBridgeControls;component/Images/BackButtons/LeftBackButtonPressed.png" Opacity="0"/>
16             </Canvas>
17           </StackPanel>
18           <ControlTemplate.Triggers>
19             <Trigger Value="True" Property="IsEnabled">
20               <Setter Property="Opacity" Value="1" TargetName="LeftBackButtonEnabled"/>
21             </Trigger>
22             <EventTrigger RoutedEvent="Button.MouseEnter">
23               <EventTrigger.Actions>
24                 <BeginStoryboard>
25                   <Storyboard Storyboard.TargetName="LeftBackButtonHover" Storyboard.TargetProperty="Opacity">
26                     <DoubleAnimation To="1" Duration="0:0:0.5"/>
27                   </Storyboard>
28                 </BeginStoryboard>
29               </EventTrigger.Actions>
30             </EventTrigger>
31             <EventTrigger RoutedEvent="Button.MouseLeave">
32               <EventTrigger.Actions>
33                 <BeginStoryboard>
34                   <Storyboard Storyboard.TargetName="LeftBackButtonHover" Storyboard.TargetProperty="Opacity">
35                     <DoubleAnimation To="0" Duration="0:0:0.5"/>
36                   </Storyboard>
37                 </BeginStoryboard>
38               </EventTrigger.Actions>
39             </EventTrigger>
40             <EventTrigger RoutedEvent="Button.PreviewMouseLeftButtonDown">
41               <EventTrigger.Actions>
42                 <BeginStoryboard>
43                   <Storyboard Storyboard.TargetName="LeftBackButtonPressed" Storyboard.TargetProperty="Opacity">
44                     <DoubleAnimation To="1" Duration="0:0:0.2"/>
45                   </Storyboard>
46                 </BeginStoryboard>
47               </EventTrigger.Actions>
48             </EventTrigger>
49             <EventTrigger RoutedEvent="Button.PreviewMouseLeftButtonUp">
50               <EventTrigger.Actions>
51                 <BeginStoryboard>
52                   <Storyboard Storyboard.TargetName="LeftBackButtonPressed" Storyboard.TargetProperty="Opacity">
53                     <DoubleAnimation To="0" Duration="0:0:0.2"/>
54                   </Storyboard>
55                 </BeginStoryboard>
56               </EventTrigger.Actions>
57             </EventTrigger>
58           </ControlTemplate.Triggers>
59         </ControlTemplate>
60       </Setter.Value>
61     </Setter>
62   </Style>
63   <Style TargetType="{x:Type v:AeroWizard}">    
64     <Setter Property="Template">
65       <Setter.Value>
66         <ControlTemplate TargetType="{x:Type v:AeroWizard}">
67           <StackPanel Margin="-1,-2,0,0" Background="Transparent">
68             <StackPanel Height="37" Orientation="Horizontal" VerticalAlignment="Top">
69               <Button VerticalAlignment="Top" Width="29" Margin="0,5,0,2" Name="BackButton" Command="BrowseBack" Style="{StaticResource BackButtonStyle}"/>
70               <Image VerticalAlignment="Top" Name="ico" Margin="7,2,7,2" Source="{TemplateBinding Glyph}"/>
71               <TextBlock TextAlignment="Center" VerticalAlignment="Center" Foreground="#000000" FontFamily="Segoe UI" FontSize="12" Text="{TemplateBinding Title}">
72                 <TextBlock.BitmapEffect>
73                   <OuterGlowBitmapEffect GlowColor="White" GlowSize="7"/>
74                 </TextBlock.BitmapEffect>
75               </TextBlock>
76             </StackPanel>
77             <Border BorderBrush="Black" BorderThickness="1" Margin="0,1,-1,0" CornerRadius="2"> 
78               <StackPanel x:Name="clientArea" Background="White">
79               <Grid Name="Header">
80                 <TextBlock Margin="38,19,38,19" FontFamily="Segoe UI Regular" TextWrapping="Wrap" Text="{TemplateBinding MainInstruction}" FontSize="16" Foreground="#1370AB"/>
81               </Grid>
82               <ContentPresenter Content="{TemplateBinding ContentArea}" HorizontalAlignment="Left" Margin="38,19,38,19" Width="555" Height="286"  />
83               <Grid Background="#F5F5F5" Name="CommandArea">
84                 <Line X1="0" X2="{Binding ElementName=CommandArea, Path=ActualWidth}" Y1="0" Y2="0" Stroke="Gray" StrokeThickness="1"/>
85                 <DockPanel LastChildFill="False" Margin="0,14,19,14" Name="Commands">
86                   <Button Padding="12,0,12,0" VerticalAlignment="Center" Margin="7,0,0,0" DockPanel.Dock="Right" Content="Cancel"/>
87                   <Button Visibility="Hidden" DockPanel.Dock="Right" Content="Next"/>
88                 </DockPanel>
89               </Grid>
90               </StackPanel>
91             </Border>
92           </StackPanel>
93           <ControlTemplate.Triggers>
94             <DataTrigger Binding="{Binding Path=ContentArea.CanGoBack, RelativeSource={RelativeSource Self}}" Value="True">
95               <Setter Property="Button.IsEnabled" Value="True" TargetName="BackButton" />
96             </DataTrigger>
97             <DataTrigger Binding="{Binding Path=ContentArea.CanGoBack, RelativeSource={RelativeSource Self}}" Value="False">
98               <Setter Property="Button.IsEnabled" Value="False" TargetName="BackButton" />
99             </DataTrigger>
100           </ControlTemplate.Triggers>
101         </ControlTemplate>
102       </Setter.Value>
103     </Setter>
104     <Setter Property="WindowStyle" Value="SingleBorderWindow"/>
105     <!--<Setter Property="Icon" Value="pack://application:,,,/None.ico"/>-->
106     <Setter Property="Background" Value="Transparent"/>
107     <Setter Property="Width" Value="620"/>
108     <Setter Property="Height" Value="489"/>
109     <Setter Property="WindowState" Value="Minimized"/>
110     <Setter Property="ResizeMode" Value="CanMinimize"/>
111   </Style>
112 </ResourceDictionary>