Mercurial > silverbladetech
view Chronosv2/source/Themes/Metro/WindowStyles.xaml @ 10:443821e55f06
Initial cleaned up add from Codeplex files
author | stevenh7776 stevenhollidge@hotmail.com |
---|---|
date | Tue, 21 Feb 2012 17:25:44 +0700 |
parents | |
children |
line wrap: on
line source
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:chronos="http://chronos/schemas/2010/xaml"> <!-- Global Settings--> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="Colors.xaml"/> <ResourceDictionary Source="Brushes.xaml"/> <ResourceDictionary Source="Fonts.xaml"/> <ResourceDictionary Source="CoreStyles.xaml"/> </ResourceDictionary.MergedDictionaries> <!-- Converters --> <chronos:ZoomTransformConverter x:Key="ZoomTransformConverter" /> <!-- Default Workspace Window Style --> <Style x:Key="DefaultWorkspaceWindowStyle" TargetType="{x:Type chronos:WindowElement}"> <Setter Property="Id" Value="{Binding Id}" /> <Setter Property="FontSize" Value="{StaticResource ContentFontSize}"/> <Setter Property="FocusVisualStyle" Value="{x:Null}" /> <Setter Property="MinWidth" Value="720" /> <Setter Property="MinHeight" Value="110" /> <Setter Property="Background" Value="{StaticResource WindowBackgroundBrush}" /> <Setter Property="BorderBrush" Value="{StaticResource WindowBorderBrush}" /> <Setter Property="BorderThickness" Value="1" /> <Setter Property="WindowState" Value="Normal" /> <Setter Property="Visibility" Value="Visible" /> <Setter Property="HorizontalContentAlignment" Value="Left" /> <Setter Property="VerticalContentAlignment" Value="Stretch" /> <Setter Property="AllowDrop" Value="False" /> <Setter Property="CanResize" Value="False" /> <Setter Property="ViewMode" Value="{Binding ViewMode}" /> <Setter Property="Title" Value="Sample Window" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type chronos:WindowElement}"> <Grid x:Name="Root"> <VisualStateManager.VisualStateGroups> <VisualStateGroup x:Name="WindowState"> <VisualState x:Name="Normal"> <Storyboard> <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility"> <DiscreteObjectKeyFrame KeyTime="0"> <DiscreteObjectKeyFrame.Value> <Visibility>Visible</Visibility> </DiscreteObjectKeyFrame.Value> </DiscreteObjectKeyFrame> </ObjectAnimationUsingKeyFrames> <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity"> <SplineDoubleKeyFrame KeyTime="0" Value="1"/> </DoubleAnimationUsingKeyFrames> </Storyboard> </VisualState> <VisualState x:Name="Minimized"> <Storyboard> <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity"> <SplineDoubleKeyFrame KeyTime="0" Value="0"/> </DoubleAnimationUsingKeyFrames> <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility"> <DiscreteObjectKeyFrame KeyTime="0"> <DiscreteObjectKeyFrame.Value> <Visibility>Collapsed</Visibility> </DiscreteObjectKeyFrame.Value> </DiscreteObjectKeyFrame> </ObjectAnimationUsingKeyFrames> </Storyboard> </VisualState> <VisualState x:Name="Maximized"> <Storyboard> <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility"> <DiscreteObjectKeyFrame KeyTime="0"> <DiscreteObjectKeyFrame.Value> <Visibility>Visible</Visibility> </DiscreteObjectKeyFrame.Value> </DiscreteObjectKeyFrame> </ObjectAnimationUsingKeyFrames> <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity"> <SplineDoubleKeyFrame KeyTime="0" Value="1"/> </DoubleAnimationUsingKeyFrames> <StringAnimationUsingKeyFrames Storyboard.TargetProperty="(TextBlock.Text)" Storyboard.TargetName="MaximizeButtonLabel"> <DiscreteStringKeyFrame KeyTime="0:0:0.0" Value="2"/> </StringAnimationUsingKeyFrames> <StringAnimationUsingKeyFrames Storyboard.TargetProperty="ToolTip" Storyboard.TargetName="PART_MaximizeButton"> <DiscreteStringKeyFrame KeyTime="0:0:0.0" Value="Restore"/> </StringAnimationUsingKeyFrames> </Storyboard> </VisualState> </VisualStateGroup> </VisualStateManager.VisualStateGroups> <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" /> <Grid Margin="15,10,15,0"> <Grid.RowDefinitions> <RowDefinition x:Name="RowHeader" Height="50" /> <RowDefinition x:Name="RowToolbar" Height="Auto" /> <RowDefinition /> <RowDefinition x:Name="RowBody" Height="*" /> <RowDefinition x:Name="RowFooter" Height="Auto" /> </Grid.RowDefinitions> <Grid Grid.Row="0"> <Grid.ColumnDefinitions> <ColumnDefinition Width="*" /> <ColumnDefinition Width="Auto" /> </Grid.ColumnDefinitions> <Rectangle x:Name="PART_Dragger" Grid.Column="0" Grid.ColumnSpan="2" Margin="3.5" Fill="Transparent" /> <Grid Grid.Column="0" IsHitTestVisible="False" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="3.5"> <Grid.RowDefinitions> <RowDefinition Height="15" /> <RowDefinition Height="Auto" /> </Grid.RowDefinitions> <ProgressBar x:Name="BrandBar" Grid.Row="0" Minimum="0" Maximum="100" Foreground="{StaticResource AccentColorBlueBrush}" HorizontalAlignment="Left" VerticalAlignment="Bottom" Width="250" Height="6" IsHitTestVisible="False" Value="100" /> <TextBlock Grid.Row="1" FontFamily="{StaticResource HeaderFontFamily}" FontSize="{StaticResource HeaderFontSize}" FontWeight="SemiBold" Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Title}" HorizontalAlignment="Left" VerticalAlignment="Center" IsHitTestVisible="False" /> </Grid> <Grid Grid.Column="1" VerticalAlignment="Center"> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto" /> <ColumnDefinition Width="Auto" /> <ColumnDefinition Width="Auto" /> </Grid.ColumnDefinitions> <Button x:Name="PART_MinimizeButton" Grid.Column="0" Style="{StaticResource MetroButtonStyle}" Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=MinimizeCommand}" VerticalAlignment="Center" Margin="1.5" ToolTip="Minimize"> <TextBlock x:Name="MinimizeButtonLabel" TextWrapping="Wrap" Text="0" FontFamily="Webdings" FontSize="13.333" Foreground="{StaticResource TextBrush}" FontWeight="Normal" /> </Button> <Button x:Name="PART_MaximizeButton" Grid.Column="1" Style="{StaticResource MetroButtonStyle}" FontFamily="Webdings" Foreground="#FF919191" FontSize="13.333" FontWeight="Normal" Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=MaximizeCommand}" VerticalAlignment="Center" Margin="1.5" ToolTip="Maximize"> <TextBlock x:Name="MaximizeButtonLabel" TextWrapping="Wrap" Text="1" FontFamily="Webdings" FontSize="13.333" Foreground="{StaticResource TextBrush}" FontWeight="Normal" /> </Button> <Button x:Name="PART_CloseButton" Grid.Column="2" Style="{StaticResource MetroButtonStyle}" FontFamily="Webdings" Foreground="#FF919191" FontSize="13.333" FontWeight="Normal" Command="{Binding CloseCommand}" VerticalAlignment="Center" Margin="1.5" ToolTip="Close"> <TextBlock x:Name="CloseButtonLabel" TextWrapping="Wrap" Text="r" FontFamily="Webdings" FontSize="13.333" Foreground="{StaticResource TextBrush}" FontWeight="Normal" /> </Button> </Grid> </Grid> <Grid Grid.Row="1"> <Grid.ColumnDefinitions> <ColumnDefinition Width="*" /> <ColumnDefinition Width="Auto" /> </Grid.ColumnDefinitions> <Grid Grid.Column="0"> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto" /> <ColumnDefinition Width="Auto" /> <ColumnDefinition Width="Auto" /> <ColumnDefinition Width="Auto" /> <ColumnDefinition Width="20" /> <ColumnDefinition Width="Auto" /> <ColumnDefinition Width="Auto" /> <ColumnDefinition Width="Auto" /> <ColumnDefinition Width="Auto" /> <ColumnDefinition Width="Auto" /> <ColumnDefinition Width="Auto" /> </Grid.ColumnDefinitions> <chronos:SplitButton x:Name="ActionsSplitButton" Grid.Column="0" Content="_actions" FontSize="18" FontWeight="Light" Placement="Bottom" VerticalAlignment="Center" Width="Auto" Height="32" Margin="3.5"> <MenuItem Header="Inquiry" Command="{Binding InquiryCommand}" /> <MenuItem Header="Edit" Command="{Binding EditCommand}" /> <MenuItem Header="Remove" Command="{Binding DeleteCommand}" /> <MenuItem Header="Save changes" Command="{Binding SaveCommand}" /> <MenuItem Header="Discard changes" Command="{Binding DiscardCommand}" /> <Separator Style="{StaticResource DefaultSeparatorStyle}" /> <MenuItem Header="Print preview ..." Command="{Binding PrintPreviewCommand}" /> <MenuItem Header="Print ..." Command="{Binding PrintCommand}" /> <Separator Style="{StaticResource DefaultSeparatorStyle}" /> <MenuItem Header="Close" Command="{Binding CloseCommand}" /> </chronos:SplitButton> <chronos:SplitButton x:Name="RelationsSplitButton" Grid.Column="1" FontSize="18" FontWeight="Light" Content="_relations" Placement="Bottom" VerticalAlignment="Center" IsEnabled="{Binding HasRelations}" Width="Auto" Height="Auto" Margin="3.5"> </chronos:SplitButton> <chronos:SplitButton x:Name="ToolsSplitButton" Grid.Column="2" FontSize="18" FontWeight="Light" Content="_tools" Placement="Bottom" VerticalAlignment="Center" Width="Auto" Height="32" Margin="3.5"> <MenuItem Header="New Window" Command="{Binding NewWindowCommand}" /> <Separator Style="{StaticResource DefaultSeparatorStyle}" /> <MenuItem Header="Bookmarks"> <MenuItem Header="Organize bookmarks" Command="{Binding OrganizeBookmarksCommand}"/> <MenuItem Header="Bookmark current" Command="{Binding BookmarkCurrentCommand}" /> <MenuItem Header="Clear bookmarks" Command="{Binding ClearBookmarksCommand}" /> <MenuItem Header="Create shortcut" Command="{Binding CreateShortcutCommand}"> </MenuItem> </MenuItem> </chronos:SplitButton> <chronos:SplitButton x:Name="HelpSplitButton" Grid.Column="3" FontSize="18" FontWeight="Light" Content="_help" Placement="Bottom" VerticalAlignment="Center" Width="Auto" Height="32" Margin="3.5"> <MenuItem Header="Show zoom window" IsChecked="{Binding ShowZoomWindow}" Command="{Binding ShowZoomWindowCommand}"/> <MenuItem Header="Show form help" Command="{Binding ShowFormHelpCommand}" /> </chronos:SplitButton> <Button Grid.Column="5" Style="{StaticResource MetroButtonStyle}" FontSize="16" FontWeight="SemiBold" VerticalAlignment="Center" Margin="3.5" Command="{Binding InquiryCommand}" Content="inquiry" ToolTip="Inquiry"> </Button> <Button Grid.Column="6" Style="{StaticResource MetroButtonStyle}" FontSize="16" FontWeight="SemiBold" VerticalAlignment="Center" Margin="3.5" Command="{Binding EditCommand}" Content="edit" ToolTip="Edit"> </Button> <Button Grid.Column="7" Style="{StaticResource MetroButtonStyle}" FontSize="16" FontWeight="SemiBold" VerticalAlignment="Center" Margin="3.5" Command="{Binding DeleteCommand}" Content="remove" ToolTip="Remove"> </Button> <Button Grid.Column="8" Style="{StaticResource MetroButtonStyle}" FontSize="16" FontWeight="SemiBold" VerticalAlignment="Center" Margin="3.5" Command="{Binding SaveCommand}" Content="save" ToolTip="Save changes"> </Button> <Button Grid.Column="9" Style="{StaticResource MetroButtonStyle}" FontSize="16" FontWeight="SemiBold" VerticalAlignment="Center" Margin="3.5" Command="{Binding DiscardCommand}" IsCancel="True" Content="discard" ToolTip="Discard changes"> </Button> <Button Grid.Column="10" Style="{StaticResource MetroButtonStyle}" FontSize="16" FontWeight="SemiBold" VerticalAlignment="Center" Margin="3.5" Command="{Binding PrintCommand}" Content="print" ToolTip="Print"> </Button> </Grid> <Grid Grid.Column="1"> <Button Style="{StaticResource HyperlinkButtonStyle}" FontSize="16" FontWeight="SemiBold" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="3.5" Command="{Binding ShowZoomWindowCommand}" Content="zoom" ToolTip="Show zoom window"> </Button> </Grid> </Grid> <chronos:HeaderNotification Grid.Row="2" Panel.ZIndex="99" MessageText="{Binding NotificationMessage}" VerticalAlignment="Top" /> <Grid Grid.Row="3"> <ContentPresenter x:Name="PART_ContentPresenter" RenderTransformOrigin="0.5,0.5" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"> <ContentPresenter.LayoutTransform> <ScaleTransform ScaleX="{Binding Value, Mode=TwoWay, Converter={StaticResource ZoomTransformConverter}, ElementName=ZoomSlider}" ScaleY="{Binding Value, Mode=TwoWay, Converter={StaticResource ZoomTransformConverter}, ElementName=ZoomSlider}" /> </ContentPresenter.LayoutTransform> </ContentPresenter> </Grid> <Grid Grid.Row="4"> <TextBlock x:Name="StatusMessage" Margin="3.5" VerticalAlignment="Center" HorizontalAlignment="Stretch" FontSize="{StaticResource ControlContentFontSize}" Text="{Binding StatusMessage}" ToolTip="{Binding StatusMessage}" /> </Grid> <Popup x:Name="ZoomView" AllowsTransparency="True" Width="300" Height="120" Focusable="True" StaysOpen="False" IsOpen="{Binding ShowZoomWindow}" Placement="Center" PlacementTarget="{Binding ElementName=Root}" PopupAnimation="Slide"> <Border Margin="5,5,5,5" CornerRadius="3,3,3,3" Effect="{StaticResource DropShadowBrush}" Background="{StaticResource WindowBackgroundBrush}"> <Grid Margin="5"> <Grid.RowDefinitions> <RowDefinition Height="Auto" /> <RowDefinition Height="*" /> <RowDefinition Height="Auto" /> </Grid.RowDefinitions> <StackPanel Grid.Row="0" Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center"> <Button x:Name="ZoomViewCloseButton" Command="{Binding ShowZoomWindowCommand}" VerticalAlignment="Center" Margin="3.5" Style="{StaticResource MetroButtonStyle}" ToolTip="Close"> <TextBlock TextWrapping="Wrap" Text="r" FontFamily="Webdings" Foreground="#FF919191" FontSize="13.333" /> </Button> </StackPanel> <Slider x:Name="ZoomSlider" Grid.Row="1" Minimum="50" Maximum="250" SmallChange="10" LargeChange="10" IsMoveToPointEnabled="True" IsSnapToTickEnabled="True" Interval="10" TickFrequency="10" TickPlacement="Both" Value="{Binding ZoomLevel, Mode=TwoWay, FallbackValue=100}" HorizontalAlignment="Stretch" VerticalAlignment="Center" /> <TextBlock Grid.Row="2" Text="{Binding Value, ElementName=ZoomSlider, StringFormat=\{0\}%}" HorizontalAlignment="Center" VerticalAlignment="Center" /> </Grid> </Border> </Popup> </Grid> </Grid> <ControlTemplate.Triggers> <Trigger Property="IsActive" Value="False"> <Setter TargetName="BrandBar" Property="Foreground" Value="{StaticResource AccentColorRedBrush}" /> <Setter TargetName="ActionsSplitButton" Property="IsEnabled" Value="False" /> <Setter TargetName="RelationsSplitButton" Property="IsEnabled" Value="False" /> <Setter TargetName="ToolsSplitButton" Property="IsEnabled" Value="False" /> <Setter TargetName="HelpSplitButton" Property="IsEnabled" Value="False" /> </Trigger> <Trigger Property="ViewMode" Value="Busy"> <Setter TargetName="BrandBar" Property="IsIndeterminate" Value="True" /> </Trigger> <Trigger Property="ShowCloseButton" Value="False"> <Setter TargetName="PART_CloseButton" Property="Visibility" Value="Collapsed" /> </Trigger> <Trigger Property="ShowMinimizeButton" Value="False"> <Setter TargetName="PART_MinimizeButton" Property="Visibility" Value="Collapsed" /> </Trigger> <Trigger Property="ShowMaximizeButton" Value="False"> <Setter TargetName="PART_MaximizeButton" Property="Visibility" Value="Collapsed" /> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> </Style> <!-- Default Window Style --> <Style x:Key="DefaultWindowStyle" TargetType="{x:Type chronos:WindowElement}"> <Setter Property="Id" Value="{Binding Id}" /> <Setter Property="FontSize" Value="{StaticResource ContentFontSize}"/> <Setter Property="FocusVisualStyle" Value="{x:Null}" /> <Setter Property="Background" Value="{StaticResource WindowBackgroundBrush}" /> <Setter Property="BorderBrush" Value="{StaticResource ControlBorderBrush}" /> <Setter Property="BorderThickness" Value="1" /> <Setter Property="WindowState" Value="Normal" /> <Setter Property="Visibility" Value="Visible" /> <Setter Property="HorizontalContentAlignment" Value="Stretch" /> <Setter Property="VerticalContentAlignment" Value="Stretch" /> <Setter Property="AllowDrop" Value="False" /> <Setter Property="CanDrag" Value="True" /> <Setter Property="CanResize" Value="False" /> <Setter Property="ShowMinimizeButton" Value="True" /> <Setter Property="ShowMaximizeButton" Value="True" /> <Setter Property="ShowCloseButton" Value="True" /> <Setter Property="ViewMode" Value="{Binding ViewMode}" /> <Setter Property="Title" Value="Sample Window" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type chronos:WindowElement}"> <Grid x:Name="Root"> <VisualStateManager.VisualStateGroups> <VisualStateGroup x:Name="WindowState"> <VisualState x:Name="Normal"> <Storyboard> <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility"> <DiscreteObjectKeyFrame KeyTime="0"> <DiscreteObjectKeyFrame.Value> <Visibility>Visible</Visibility> </DiscreteObjectKeyFrame.Value> </DiscreteObjectKeyFrame> </ObjectAnimationUsingKeyFrames> <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity"> <SplineDoubleKeyFrame KeyTime="0" Value="1"/> </DoubleAnimationUsingKeyFrames> </Storyboard> </VisualState> <VisualState x:Name="Minimized"> <Storyboard> <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity"> <SplineDoubleKeyFrame KeyTime="0" Value="0"/> </DoubleAnimationUsingKeyFrames> <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility"> <DiscreteObjectKeyFrame KeyTime="0"> <DiscreteObjectKeyFrame.Value> <Visibility>Collapsed</Visibility> </DiscreteObjectKeyFrame.Value> </DiscreteObjectKeyFrame> </ObjectAnimationUsingKeyFrames> </Storyboard> </VisualState> <VisualState x:Name="Maximized"> <Storyboard> <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility"> <DiscreteObjectKeyFrame KeyTime="0"> <DiscreteObjectKeyFrame.Value> <Visibility>Visible</Visibility> </DiscreteObjectKeyFrame.Value> </DiscreteObjectKeyFrame> </ObjectAnimationUsingKeyFrames> <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity"> <SplineDoubleKeyFrame KeyTime="0" Value="1"/> </DoubleAnimationUsingKeyFrames> <StringAnimationUsingKeyFrames Storyboard.TargetProperty="(TextBlock.Text)" Storyboard.TargetName="MaximizeButtonLabel"> <DiscreteStringKeyFrame KeyTime="0:0:0.0" Value="2"/> </StringAnimationUsingKeyFrames> <StringAnimationUsingKeyFrames Storyboard.TargetProperty="ToolTip" Storyboard.TargetName="PART_MaximizeButton"> <DiscreteStringKeyFrame KeyTime="0:0:0.0" Value="Restore"/> </StringAnimationUsingKeyFrames> </Storyboard> </VisualState> </VisualStateGroup> </VisualStateManager.VisualStateGroups> <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Effect="{StaticResource DropShadowBrush}"/> <Grid Margin="20,16,20,5"> <Grid.RowDefinitions> <RowDefinition x:Name="RowHeader" Height="Auto" /> <RowDefinition /> <RowDefinition x:Name="RowBody" Height="*" /> <RowDefinition x:Name="RowFooter" Height="Auto" /> </Grid.RowDefinitions> <Grid Grid.Row="0"> <Grid.ColumnDefinitions> <ColumnDefinition Width="*" /> <ColumnDefinition Width="Auto" /> </Grid.ColumnDefinitions> <Rectangle x:Name="PART_Dragger" Grid.Column="0" Grid.ColumnSpan="2" Margin="3.5" Fill="Transparent" /> <Grid Grid.Column="0" IsHitTestVisible="False" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="3.5"> <Grid.RowDefinitions> <RowDefinition Height="15" /> <RowDefinition Height="Auto" /> </Grid.RowDefinitions> <ProgressBar x:Name="BrandBar" Grid.Row="0" Minimum="0" Maximum="100" Foreground="{StaticResource AccentColorBlueBrush}" HorizontalAlignment="Left" VerticalAlignment="Bottom" Width="250" Height="6" IsHitTestVisible="False" Value="100" /> <TextBlock Grid.Row="1" FontFamily="{StaticResource HeaderFontFamily}" FontSize="{StaticResource HeaderFontSize}" FontWeight="SemiBold" Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Title}" HorizontalAlignment="Left" VerticalAlignment="Center" IsHitTestVisible="False" /> </Grid> <Grid Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="3.5"> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto" /> <ColumnDefinition Width="Auto" /> <ColumnDefinition Width="Auto" /> </Grid.ColumnDefinitions> <Button x:Name="PART_MinimizeButton" Grid.Column="0" Style="{StaticResource MetroButtonStyle}" Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=MinimizeCommand}" VerticalAlignment="Center" Margin="1.5" ToolTip="Minimize"> <TextBlock x:Name="MinimizeButtonLabel" TextWrapping="Wrap" Text="0" FontFamily="Webdings" FontSize="13.333" Foreground="{StaticResource TextBrush}" FontWeight="Normal" /> </Button> <Button x:Name="PART_MaximizeButton" Grid.Column="1" Style="{StaticResource MetroButtonStyle}" FontFamily="Webdings" Foreground="#FF919191" FontSize="13.333" FontWeight="Normal" Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=MaximizeCommand}" VerticalAlignment="Center" Margin="1.5" ToolTip="Maximize"> <TextBlock x:Name="MaximizeButtonLabel" TextWrapping="Wrap" Text="1" FontFamily="Webdings" FontSize="13.333" Foreground="{StaticResource TextBrush}" FontWeight="Normal" /> </Button> <Button x:Name="PART_CloseButton" Grid.Column="2" Style="{StaticResource MetroButtonStyle}" FontFamily="Webdings" Foreground="#FF919191" FontSize="13.333" FontWeight="Normal" Command="{Binding CloseCommand}" VerticalAlignment="Center" Margin="1.5" ToolTip="Close"> <TextBlock x:Name="CloseButtonLabel" TextWrapping="Wrap" Text="r" FontFamily="Webdings" FontSize="13.333" Foreground="{StaticResource TextBrush}" FontWeight="Normal" /> </Button> </Grid> </Grid> <chronos:HeaderNotification Grid.Row="1" Panel.ZIndex="99" MessageText="{Binding NotificationMessage}" VerticalAlignment="Top" /> <Grid Grid.Row="2"> <ContentPresenter x:Name="PART_ContentPresenter" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"> </ContentPresenter> </Grid> <Grid Grid.Row="3"> <TextBlock x:Name="StatusMessage" Margin="3.5" VerticalAlignment="Center" HorizontalAlignment="Stretch" FontSize="{StaticResource ControlContentFontSize}" Text="{Binding StatusMessage}" ToolTip="{Binding StatusMessage}" /> </Grid> </Grid> </Grid> <ControlTemplate.Triggers> <Trigger Property="IsActive" Value="False"> <Setter TargetName="BrandBar" Property="Foreground" Value="{StaticResource AccentColorRedBrush}" /> </Trigger> <Trigger Property="ViewMode" Value="Busy"> <Setter TargetName="BrandBar" Property="IsIndeterminate" Value="True" /> </Trigger> <Trigger Property="ShowMinimizeButton" Value="False"> <Setter TargetName="PART_MinimizeButton" Property="Visibility" Value="Collapsed" /> </Trigger> <Trigger Property="ShowMaximizeButton" Value="False"> <Setter TargetName="PART_MaximizeButton" Property="Visibility" Value="Collapsed" /> </Trigger> <Trigger Property="ShowCloseButton" Value="False"> <Setter TargetName="PART_CloseButton" Property="Visibility" Value="Collapsed" /> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> </Style> <!-- Default Dialog Window Style --> <Style x:Key="DefaultDialogWindowStyle" TargetType="{x:Type chronos:WindowElement}" BasedOn="{StaticResource DefaultWindowStyle}"> <Setter Property="CanDrag" Value="False" /> <Setter Property="ShowMinimizeButton" Value="False" /> <Setter Property="ShowMaximizeButton" Value="False" /> <Setter Property="ShowCloseButton" Value="False" /> <Setter Property="Background" Value="{StaticResource GradientBackgroundBrush}" /> </Style> <!-- Basic Window Style --> <Style x:Key="BasicWindowStyle" TargetType="{x:Type chronos:WindowElement}"> <Setter Property="Id" Value="{Binding Id}" /> <Setter Property="FontSize" Value="{StaticResource ContentFontSize}"/> <Setter Property="FocusVisualStyle" Value="{x:Null}" /> <Setter Property="Background" Value="{StaticResource WindowBackgroundBrush}" /> <Setter Property="BorderBrush" Value="{StaticResource ControlBorderBrush}" /> <Setter Property="BorderThickness" Value="1" /> <Setter Property="WindowState" Value="Normal" /> <Setter Property="Visibility" Value="Visible" /> <Setter Property="HorizontalContentAlignment" Value="Stretch" /> <Setter Property="VerticalContentAlignment" Value="Stretch" /> <Setter Property="AllowDrop" Value="False" /> <Setter Property="CanDrag" Value="True" /> <Setter Property="CanResize" Value="False" /> <Setter Property="ShowMinimizeButton" Value="True" /> <Setter Property="ShowMaximizeButton" Value="True" /> <Setter Property="ShowCloseButton" Value="True" /> <Setter Property="Title" Value="Sample Window" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type chronos:WindowElement}"> <Grid x:Name="Root"> <VisualStateManager.VisualStateGroups> <VisualStateGroup x:Name="WindowState"> <VisualState x:Name="Normal"> <Storyboard> <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility"> <DiscreteObjectKeyFrame KeyTime="0"> <DiscreteObjectKeyFrame.Value> <Visibility>Visible</Visibility> </DiscreteObjectKeyFrame.Value> </DiscreteObjectKeyFrame> </ObjectAnimationUsingKeyFrames> <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity"> <SplineDoubleKeyFrame KeyTime="0" Value="1"/> </DoubleAnimationUsingKeyFrames> </Storyboard> </VisualState> <VisualState x:Name="Minimized"> <Storyboard> <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity"> <SplineDoubleKeyFrame KeyTime="0" Value="0"/> </DoubleAnimationUsingKeyFrames> <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility"> <DiscreteObjectKeyFrame KeyTime="0"> <DiscreteObjectKeyFrame.Value> <Visibility>Collapsed</Visibility> </DiscreteObjectKeyFrame.Value> </DiscreteObjectKeyFrame> </ObjectAnimationUsingKeyFrames> </Storyboard> </VisualState> <VisualState x:Name="Maximized"> <Storyboard> <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility"> <DiscreteObjectKeyFrame KeyTime="0"> <DiscreteObjectKeyFrame.Value> <Visibility>Visible</Visibility> </DiscreteObjectKeyFrame.Value> </DiscreteObjectKeyFrame> </ObjectAnimationUsingKeyFrames> <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity"> <SplineDoubleKeyFrame KeyTime="0" Value="1"/> </DoubleAnimationUsingKeyFrames> <StringAnimationUsingKeyFrames Storyboard.TargetProperty="(TextBlock.Text)" Storyboard.TargetName="MaximizeButtonLabel"> <DiscreteStringKeyFrame KeyTime="0:0:0.0" Value="2"/> </StringAnimationUsingKeyFrames> <StringAnimationUsingKeyFrames Storyboard.TargetProperty="ToolTip" Storyboard.TargetName="PART_MaximizeButton"> <DiscreteStringKeyFrame KeyTime="0:0:0.0" Value="Restore"/> </StringAnimationUsingKeyFrames> </Storyboard> </VisualState> </VisualStateGroup> </VisualStateManager.VisualStateGroups> <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Effect="{StaticResource DropShadowBrush}"/> <Grid Margin="20,16,20,5"> <Grid.RowDefinitions> <RowDefinition x:Name="RowHeader" Height="Auto" /> <RowDefinition Height="20" /> <RowDefinition x:Name="RowBody" Height="*" /> <RowDefinition Height="20" /> </Grid.RowDefinitions> <Grid Grid.Row="0"> <Grid.ColumnDefinitions> <ColumnDefinition Width="*" /> <ColumnDefinition Width="Auto" /> </Grid.ColumnDefinitions> <Rectangle x:Name="PART_Dragger" Grid.Column="0" Grid.ColumnSpan="2" Margin="3.5" Fill="Transparent" /> <Grid Grid.Column="0" IsHitTestVisible="False" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="3.5"> <Grid.RowDefinitions> <RowDefinition Height="15" /> <RowDefinition Height="Auto" /> </Grid.RowDefinitions> <ProgressBar x:Name="BrandBar" Grid.Row="0" Minimum="0" Maximum="100" Foreground="{StaticResource AccentColorBlueBrush}" HorizontalAlignment="Left" VerticalAlignment="Bottom" Width="250" Height="6" IsHitTestVisible="False" Value="100" /> <TextBlock Grid.Row="1" FontFamily="{StaticResource HeaderFontFamily}" FontSize="{StaticResource HeaderFontSize}" FontWeight="SemiBold" Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Title}" HorizontalAlignment="Left" VerticalAlignment="Center" IsHitTestVisible="False" /> </Grid> <Grid Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="3.5"> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto" /> <ColumnDefinition Width="Auto" /> <ColumnDefinition Width="Auto" /> </Grid.ColumnDefinitions> <Button x:Name="PART_MinimizeButton" Grid.Column="0" Style="{StaticResource MetroButtonStyle}" Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=MinimizeCommand}" VerticalAlignment="Center" Margin="1.5" ToolTip="Minimize"> <TextBlock x:Name="MinimizeButtonLabel" TextWrapping="Wrap" Text="0" FontFamily="Webdings" FontSize="13.333" Foreground="{StaticResource TextBrush}" FontWeight="Normal" /> </Button> <Button x:Name="PART_MaximizeButton" Grid.Column="1" Style="{StaticResource MetroButtonStyle}" FontFamily="Webdings" Foreground="#FF919191" FontSize="13.333" FontWeight="Normal" Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=MaximizeCommand}" VerticalAlignment="Center" Margin="1.5" ToolTip="Maximize"> <TextBlock x:Name="MaximizeButtonLabel" TextWrapping="Wrap" Text="1" FontFamily="Webdings" FontSize="13.333" Foreground="{StaticResource TextBrush}" FontWeight="Normal" /> </Button> <Button x:Name="PART_CloseButton" Grid.Column="2" Style="{StaticResource MetroButtonStyle}" FontFamily="Webdings" Foreground="#FF919191" FontSize="13.333" FontWeight="Normal" Command="{Binding CloseCommand}" VerticalAlignment="Center" Margin="1.5" ToolTip="Close"> <TextBlock x:Name="CloseButtonLabel" TextWrapping="Wrap" Text="r" FontFamily="Webdings" FontSize="13.333" Foreground="{StaticResource TextBrush}" FontWeight="Normal" /> </Button> </Grid> </Grid> <Grid Grid.Row="2"> <ContentPresenter x:Name="PART_ContentPresenter" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"> </ContentPresenter> </Grid> </Grid> </Grid> <ControlTemplate.Triggers> <Trigger Property="IsActive" Value="False"> <Setter TargetName="BrandBar" Property="Foreground" Value="{StaticResource AccentColorRedBrush}" /> </Trigger> <Trigger Property="ViewMode" Value="Busy"> <Setter TargetName="BrandBar" Property="IsIndeterminate" Value="True" /> </Trigger> <Trigger Property="ShowMinimizeButton" Value="False"> <Setter TargetName="PART_MinimizeButton" Property="Visibility" Value="Collapsed" /> </Trigger> <Trigger Property="ShowMaximizeButton" Value="False"> <Setter TargetName="PART_MaximizeButton" Property="Visibility" Value="Collapsed" /> </Trigger> <Trigger Property="ShowCloseButton" Value="False"> <Setter TargetName="PART_CloseButton" Property="Visibility" Value="Collapsed" /> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> </Style> <!-- Basic Dialog Window Style --> <Style x:Key="BasicDialogWindowStyle" TargetType="{x:Type chronos:WindowElement}" BasedOn="{StaticResource BasicWindowStyle}"> <Setter Property="CanDrag" Value="False" /> <Setter Property="ShowMinimizeButton" Value="False" /> <Setter Property="ShowMaximizeButton" Value="False" /> <Setter Property="ShowCloseButton" Value="False" /> <Setter Property="Background" Value="{StaticResource GradientBackgroundBrush}" /> </Style> <!-- Message Window Style --> <Style TargetType="{x:Type chronos:MessageWindowElement}"> <Setter Property="FocusVisualStyle" Value="{x:Null}" /> <Setter Property="Background" Value="{StaticResource GradientBackgroundBrush}" /> <Setter Property="BorderBrush" Value="{StaticResource ControlBorderBrush}" /> <Setter Property="BorderThickness" Value="1" /> <Setter Property="WindowState" Value="Normal" /> <Setter Property="Visibility" Value="Visible" /> <Setter Property="HorizontalContentAlignment" Value="Center" /> <Setter Property="VerticalContentAlignment" Value="Center" /> <Setter Property="AllowDrop" Value="False" /> <Setter Property="CanDrag" Value="False" /> <Setter Property="CanResize" Value="False" /> <Setter Property="ShowMinimizeButton" Value="False" /> <Setter Property="ShowMaximizeButton" Value="False" /> <Setter Property="ShowCloseButton" Value="False" /> <Setter Property="Title" Value="Sample Window" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type chronos:MessageWindowElement}"> <Grid x:Name="Root"> <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Effect="{StaticResource DropShadowBrush}"/> <Grid Margin="30,16,30,30"> <Grid.RowDefinitions> <RowDefinition x:Name="RowHeader" Height="Auto" /> <RowDefinition Height="15" /> <RowDefinition x:Name="RowBody" Height="*" /> <RowDefinition x:Name="RowFooter" Height="Auto" /> </Grid.RowDefinitions> <Grid Grid.Row="0"> <Grid.ColumnDefinitions> <ColumnDefinition Width="*" /> <ColumnDefinition Width="Auto" /> </Grid.ColumnDefinitions> <Rectangle x:Name="PART_Dragger" Grid.Column="0" Grid.ColumnSpan="2" Margin="3.5" Fill="Transparent" /> <Grid Grid.Column="0" IsHitTestVisible="False" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="3.5"> <Grid.RowDefinitions> <RowDefinition Height="15" /> <RowDefinition Height="Auto" /> </Grid.RowDefinitions> <Rectangle Grid.Row="0" VerticalAlignment="Bottom" HorizontalAlignment="Left" Fill="{StaticResource AccentColorBlueBrush}" Width="109" Height="6" IsHitTestVisible="False" /> <TextBlock Grid.Row="1" FontFamily="{StaticResource HeaderFontFamily}" FontSize="{StaticResource HeaderFontSize}" FontWeight="SemiBold" Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Title}" HorizontalAlignment="Left" VerticalAlignment="Center" IsHitTestVisible="False" /> </Grid> <Grid Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="3.5" Visibility="Collapsed"> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto" /> <ColumnDefinition Width="Auto" /> <ColumnDefinition Width="Auto" /> </Grid.ColumnDefinitions> <Button x:Name="PART_MinimizeButton" Grid.Column="0" Style="{StaticResource MetroButtonStyle}" Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=MinimizeCommand}" VerticalAlignment="Center" Margin="1.5" ToolTip="Minimize"> <TextBlock x:Name="MinimizeButtonLabel" TextWrapping="Wrap" Text="0" FontFamily="Webdings" FontSize="13.333" Foreground="{StaticResource TextBrush}" FontWeight="Normal" /> </Button> <Button x:Name="PART_MaximizeButton" Grid.Column="1" Style="{StaticResource MetroButtonStyle}" FontFamily="Webdings" Foreground="#FF919191" FontSize="13.333" FontWeight="Normal" Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=MaximizeCommand}" VerticalAlignment="Center" Margin="1.5" ToolTip="Maximize"> <TextBlock x:Name="MaximizeButtonLabel" TextWrapping="Wrap" Text="1" FontFamily="Webdings" FontSize="13.333" Foreground="{StaticResource TextBrush}" FontWeight="Normal" /> </Button> <Button x:Name="PART_CloseButton" Grid.Column="2" Style="{StaticResource MetroButtonStyle}" FontFamily="Webdings" Foreground="#FF919191" FontSize="13.333" FontWeight="Normal" Command="{Binding CloseCommand}" VerticalAlignment="Center" Margin="1.5" ToolTip="Close"> <TextBlock x:Name="CloseButtonLabel" TextWrapping="Wrap" Text="r" FontFamily="Webdings" FontSize="13.333" Foreground="{StaticResource TextBrush}" FontWeight="Normal" /> </Button> </Grid> </Grid> <Grid Grid.Row="2"> <ContentControl FontSize="{StaticResource ContentFontSize}" FontWeight="SemiBold"> <ContentPresenter x:Name="PART_ContentPresenter" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"> </ContentPresenter> </ContentControl> </Grid> <Grid Grid.Row="3"> <StackPanel x:Name="ButtonsPanel" Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right"> <Button x:Name="AcceptButton" Style="{StaticResource HyperlinkButtonStyle}" Margin="3.5" Padding="2" Command="chronos:MessageWindowElement.AcceptCommand" IsDefault="True" /> <Button x:Name="CancelButton" Margin="3.5" Padding="2" Style="{StaticResource HyperlinkButtonStyle}" Command="chronos:MessageWindowElement.CancelCommand" IsCancel="True" /> </StackPanel> </Grid> </Grid> </Grid> <ControlTemplate.Triggers> <Trigger Property="Buttons" Value="OKCancel"> <Setter TargetName="AcceptButton" Property="Content" Value="Aceptar" /> <Setter TargetName="CancelButton" Property="Content" Value="Cancelar" /> </Trigger> <Trigger Property="Buttons" Value="YesNo"> <Setter TargetName="AcceptButton" Property="Content" Value="Sí" /> <Setter TargetName="CancelButton" Property="Content" Value="No" /> </Trigger> <Trigger Property="Buttons" Value="Ok"> <Setter TargetName="ButtonsPanel" Property="HorizontalAlignment" Value="Center" /> <Setter TargetName="AcceptButton" Property="Content" Value="Aceptar" /> <Setter TargetName="CancelButton" Property="Visibility" Value="Collapsed" /> </Trigger> <Trigger Property="ShowMinimizeButton" Value="False"> <Setter TargetName="PART_MinimizeButton" Property="Visibility" Value="Collapsed" /> </Trigger> <Trigger Property="ShowMaximizeButton" Value="False"> <Setter TargetName="PART_MaximizeButton" Property="Visibility" Value="Collapsed" /> </Trigger> <Trigger Property="ShowCloseButton" Value="False"> <Setter TargetName="PART_CloseButton" Property="Visibility" Value="Collapsed" /> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> </Style> </ResourceDictionary>