123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339 |
- <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:hc="clr-namespace:HandyControl.Controls"
- xmlns:interactivity="clr-namespace:HandyControl.Interactivity">
- <LinearGradientBrush x:Key="ResizeGripperForeground" EndPoint="1,0.75" StartPoint="0,0.25">
- <GradientStop Color="#FFFFFF" Offset="0.3"/>
- <GradientStop Color="#BBC5D7" Offset="0.75"/>
- <GradientStop Color="#6D83A9" Offset="1"/>
- </LinearGradientBrush>
- <Style TargetType="ResizeGrip">
- <Setter Property="MinWidth" Value="11"/>
- <Setter Property="MinHeight" Value="11"/>
- <Setter Property="Width" Value="11"/>
- <Setter Property="Height" Value="11"/>
- <Setter Property="Background" Value="Transparent"/>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="ResizeGrip">
- <hc:SimplePanel Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
- <Path Width="11" Height="11" Data="M 9,0 L 11,0 L 11,11 L 0,11 L 0,9 L 3,9 L 3,6 L 6,6 L 6,3 L 9,3 z" HorizontalAlignment="Right" VerticalAlignment="Bottom">
- <Path.Fill>
- <DrawingBrush TileMode="Tile" Viewbox="0,0,3,3" Viewport="0,0,3,3" ViewportUnits="Absolute" ViewboxUnits="Absolute">
- <DrawingBrush.Drawing>
- <DrawingGroup>
- <GeometryDrawing Brush="{StaticResource ResizeGripperForeground}">
- <GeometryDrawing.Geometry>
- <RectangleGeometry Rect="0,0,2,2"/>
- </GeometryDrawing.Geometry>
- </GeometryDrawing>
- </DrawingGroup>
- </DrawingBrush.Drawing>
- </DrawingBrush>
- </Path.Fill>
- </Path>
- </hc:SimplePanel>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style TargetType="Window">
- <Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}"/>
- <Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
- <Setter Property="UseLayoutRounding" Value="True"/>
- </Style>
- <ControlTemplate x:Key="WindowWin10Template" TargetType="hc:Window">
- <Border SnapsToDevicePixels="True" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}">
- <Grid Margin="{TemplateBinding Padding}">
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto"/>
- <RowDefinition/>
- </Grid.RowDefinitions>
- <Grid Background="{TemplateBinding NonClientAreaBackground}" Name="PART_NonClientArea" TextElement.Foreground="{TemplateBinding NonClientAreaForeground}">
- <Grid.ColumnDefinitions>
- <ColumnDefinition/>
- <ColumnDefinition Width="Auto"/>
- </Grid.ColumnDefinitions>
- <StackPanel Name="ButtonPanel" WindowChrome.IsHitTestVisibleInChrome="True" UseLayoutRounding="True" VerticalAlignment="Top" Grid.Column="1" HorizontalAlignment="Right" Orientation="Horizontal">
- <Button Background="{TemplateBinding OtherButtonBackground}" Foreground="{TemplateBinding OtherButtonForeground}" Command="SystemCommands.MinimizeWindowCommand" IsTabStop="False" Name="ButtonMin" Height="29" Style="{StaticResource ButtonIcon}" Width="45" hc:IconElement.Geometry="{StaticResource WindowMinGeometry}" BorderThickness="1,0,1,0" hc:IconElement.Width="10" hc:IconElement.Height="10"/>
- <Button Background="{TemplateBinding OtherButtonBackground}" Foreground="{TemplateBinding OtherButtonForeground}" Command="SystemCommands.MaximizeWindowCommand" IsTabStop="False" Name="ButtonMax" Height="29" Style="{StaticResource ButtonIcon}" Width="46" hc:IconElement.Geometry="{StaticResource WindowMaxGeometry}" BorderThickness="1,0,1,0" hc:IconElement.Width="10" hc:IconElement.Height="10"/>
- <Button Background="{TemplateBinding OtherButtonBackground}" Foreground="{TemplateBinding OtherButtonForeground}" Command="SystemCommands.RestoreWindowCommand" IsTabStop="False" Name="ButtonRestore" Height="29" Style="{StaticResource ButtonIcon}" Width="46" hc:IconElement.Geometry="{StaticResource WindowRestoreGeometry}" BorderThickness="1,0,1,0" hc:IconElement.Width="10" hc:IconElement.Height="10"/>
- <Button Background="{TemplateBinding CloseButtonBackground}" Foreground="{TemplateBinding CloseButtonForeground}" Command="SystemCommands.CloseWindowCommand" IsTabStop="False" Name="ButtonClose" Height="29" Style="{StaticResource ButtonIcon}" Width="46" hc:IconElement.Geometry="{StaticResource CloseGeometry}" BorderThickness="1,0,0,0" hc:IconElement.Width="10" hc:IconElement.Height="10"/>
- </StackPanel>
- <Grid Grid.Column="0">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="Auto"/>
- <ColumnDefinition Width="Auto"/>
- <ColumnDefinition/>
- </Grid.ColumnDefinitions>
- <Button Name="ButtonIcon" Visibility="{TemplateBinding Icon,Converter={StaticResource Object2VisibilityConverter}}" Command="{x:Static SystemCommands.ShowSystemMenuCommand}" Background="Transparent" Margin="10,0,0,0" WindowChrome.IsHitTestVisibleInChrome="True" Style="{StaticResource ButtonCustom}" VerticalAlignment="Center">
- <interactivity:Interaction.Triggers>
- <interactivity:EventTrigger EventName="MouseDoubleClick">
- <interactivity:InvokeCommandAction Command="{x:Static SystemCommands.CloseWindowCommand}" />
- </interactivity:EventTrigger>
- </interactivity:Interaction.Triggers>
- <Image IsHitTestVisible="False" Source="{TemplateBinding Icon}" VerticalAlignment="Center" Width="16" Height="16"/>
- </Button>
- <TextBlock Grid.Column="1" Text="{TemplateBinding Title}" Padding="10,0,0,0" VerticalAlignment="Center">
- <TextBlock.Visibility>
- <MultiBinding Converter="{StaticResource BooleanArr2VisibilityConverter}">
- <MultiBinding.Bindings>
- <Binding Path="ShowTitle" RelativeSource="{RelativeSource TemplatedParent}"/>
- <Binding Path="Title" RelativeSource="{RelativeSource TemplatedParent}" Converter="{StaticResource Object2BooleanConverter}"/>
- </MultiBinding.Bindings>
- </MultiBinding>
- </TextBlock.Visibility>
- </TextBlock>
- <ContentPresenter WindowChrome.IsHitTestVisibleInChrome="True" Grid.Column="2" x:Name="ContentPresenterMain" Content="{TemplateBinding NonClientAreaContent}"/>
- </Grid>
- </Grid>
- <AdornerDecorator Grid.Row="1">
- <ContentPresenter ClipToBounds="True"/>
- </AdornerDecorator>
- <ResizeGrip Width="10" Height="10" x:Name="ResizeGrip" HorizontalAlignment="Right" VerticalAlignment="Bottom" Grid.Row="1" IsTabStop="False" Visibility="Collapsed" WindowChrome.ResizeGripDirection="BottomRight" />
- </Grid>
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsActive" Value="False">
- <Setter Property="Opacity" Value=".8" TargetName="ContentPresenterMain"/>
- <Setter Property="Opacity" Value=".8" TargetName="ButtonPanel"/>
- </Trigger>
- <Trigger Property="WindowState" Value="Maximized">
- <Setter Property="Visibility" Value="Collapsed" TargetName="ButtonMax"/>
- <Setter Property="Visibility" Value="Visible" TargetName="ButtonRestore"/>
- </Trigger>
- <Trigger Property="WindowState" Value="Normal">
- <Setter Property="Visibility" Value="Visible" TargetName="ButtonMax"/>
- <Setter Property="Visibility" Value="Collapsed" TargetName="ButtonRestore"/>
- </Trigger>
- <Trigger Property="ResizeMode" Value="NoResize">
- <Setter Property="Visibility" Value="Collapsed" TargetName="ButtonMin"/>
- <Setter Property="Visibility" Value="Collapsed" TargetName="ButtonMax"/>
- <Setter Property="Visibility" Value="Collapsed" TargetName="ButtonRestore"/>
- </Trigger>
- <Trigger Property="ResizeMode" Value="CanMinimize">
- <Setter Property="Visibility" Value="Collapsed" TargetName="ButtonMax"/>
- <Setter Property="Visibility" Value="Collapsed" TargetName="ButtonRestore"/>
- </Trigger>
- <Trigger Property="IsMouseOver" Value="True" SourceName="ButtonClose">
- <Setter Property="Background" TargetName="ButtonClose" Value="{Binding CloseButtonHoverBackground,RelativeSource={RelativeSource TemplatedParent}}"/>
- <Setter Property="Foreground" TargetName="ButtonClose" Value="{Binding CloseButtonHoverForeground,RelativeSource={RelativeSource TemplatedParent}}"/>
- </Trigger>
- <Trigger Property="IsMouseOver" Value="True" SourceName="ButtonMax">
- <Setter Property="Background" TargetName="ButtonMax" Value="{Binding OtherButtonHoverBackground,RelativeSource={RelativeSource TemplatedParent}}"/>
- <Setter Property="Foreground" TargetName="ButtonMax" Value="{Binding OtherButtonHoverForeground,RelativeSource={RelativeSource TemplatedParent}}"/>
- </Trigger>
- <Trigger Property="IsMouseOver" Value="True" SourceName="ButtonRestore">
- <Setter Property="Background" TargetName="ButtonRestore" Value="{Binding OtherButtonHoverBackground,RelativeSource={RelativeSource TemplatedParent}}"/>
- <Setter Property="Foreground" TargetName="ButtonRestore" Value="{Binding OtherButtonHoverForeground,RelativeSource={RelativeSource TemplatedParent}}"/>
- </Trigger>
- <Trigger Property="IsMouseOver" Value="True" SourceName="ButtonMin">
- <Setter Property="Background" TargetName="ButtonMin" Value="{Binding OtherButtonHoverBackground,RelativeSource={RelativeSource TemplatedParent}}"/>
- <Setter Property="Foreground" TargetName="ButtonMin" Value="{Binding OtherButtonHoverForeground,RelativeSource={RelativeSource TemplatedParent}}"/>
- </Trigger>
- <Trigger Property="WindowStyle" Value="None">
- <Setter Property="ShowNonClientArea" Value="False"/>
- </Trigger>
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="ResizeMode" Value="CanResizeWithGrip"/>
- <Condition Property="WindowState" Value="Normal" />
- </MultiTrigger.Conditions>
- <Setter TargetName="ResizeGrip" Property="Visibility" Value="Visible" />
- </MultiTrigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- <ControlTemplate x:Key="WindowWin10ExtendContentToNonClientTemplate" TargetType="hc:Window">
- <Border SnapsToDevicePixels="True" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}">
- <hc:SimplePanel Margin="{TemplateBinding Padding}">
- <AdornerDecorator>
- <hc:SimplePanel>
- <ContentPresenter ClipToBounds="True"/>
- <Grid Background="{TemplateBinding NonClientAreaBackground}" Name="PART_NonClientArea" TextElement.Foreground="{TemplateBinding NonClientAreaForeground}" VerticalAlignment="Top">
- <Grid.ColumnDefinitions>
- <ColumnDefinition/>
- <ColumnDefinition Width="Auto"/>
- </Grid.ColumnDefinitions>
- <StackPanel Name="ButtonPanel" WindowChrome.IsHitTestVisibleInChrome="True" UseLayoutRounding="True" VerticalAlignment="Top" Grid.Column="1" HorizontalAlignment="Right" Orientation="Horizontal">
- <Button Background="{TemplateBinding OtherButtonBackground}" Foreground="{TemplateBinding OtherButtonForeground}" Command="SystemCommands.MinimizeWindowCommand" IsTabStop="False" Name="ButtonMin" Height="29" Style="{StaticResource ButtonIcon}" Width="45" hc:IconElement.Geometry="{StaticResource WindowMinGeometry}" BorderThickness="1,0,1,0" hc:IconElement.Width="10" hc:IconElement.Height="10"/>
- <Button Background="{TemplateBinding OtherButtonBackground}" Foreground="{TemplateBinding OtherButtonForeground}" Command="SystemCommands.MaximizeWindowCommand" IsTabStop="False" Name="ButtonMax" Height="29" Style="{StaticResource ButtonIcon}" Width="46" hc:IconElement.Geometry="{StaticResource WindowMaxGeometry}" BorderThickness="1,0,1,0" hc:IconElement.Width="10" hc:IconElement.Height="10"/>
- <Button Background="{TemplateBinding OtherButtonBackground}" Foreground="{TemplateBinding OtherButtonForeground}" Command="SystemCommands.RestoreWindowCommand" IsTabStop="False" Name="ButtonRestore" Height="29" Style="{StaticResource ButtonIcon}" Width="46" hc:IconElement.Geometry="{StaticResource WindowRestoreGeometry}" BorderThickness="1,0,1,0" hc:IconElement.Width="10" hc:IconElement.Height="10"/>
- <Button Background="{TemplateBinding CloseButtonBackground}" Foreground="{TemplateBinding CloseButtonForeground}" Command="SystemCommands.CloseWindowCommand" IsTabStop="False" Name="ButtonClose" Height="29" Style="{StaticResource ButtonIcon}" Width="46" hc:IconElement.Geometry="{StaticResource CloseGeometry}" BorderThickness="1,0,0,0" hc:IconElement.Width="10" hc:IconElement.Height="10"/>
- </StackPanel>
- <Grid Grid.Column="0">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="Auto"/>
- <ColumnDefinition Width="Auto"/>
- <ColumnDefinition/>
- </Grid.ColumnDefinitions>
- <Button Name="ButtonIcon" Visibility="{TemplateBinding Icon,Converter={StaticResource Object2VisibilityConverter}}" Command="{x:Static SystemCommands.ShowSystemMenuCommand}" Background="Transparent" Margin="10,0,0,0" WindowChrome.IsHitTestVisibleInChrome="True" Style="{StaticResource ButtonCustom}" VerticalAlignment="Center">
- <interactivity:Interaction.Triggers>
- <interactivity:EventTrigger EventName="MouseDoubleClick">
- <interactivity:InvokeCommandAction Command="{x:Static SystemCommands.CloseWindowCommand}" />
- </interactivity:EventTrigger>
- </interactivity:Interaction.Triggers>
- <Image IsHitTestVisible="False" Source="{TemplateBinding Icon}" VerticalAlignment="Center" Width="16" Height="16"/>
- </Button>
- <TextBlock Grid.Column="1" Text="{TemplateBinding Title}" Padding="10,0,0,0" VerticalAlignment="Center">
- <TextBlock.Visibility>
- <MultiBinding Converter="{StaticResource BooleanArr2VisibilityConverter}">
- <MultiBinding.Bindings>
- <Binding Path="ShowTitle" RelativeSource="{RelativeSource TemplatedParent}"/>
- <Binding Path="Title" RelativeSource="{RelativeSource TemplatedParent}" Converter="{StaticResource Object2BooleanConverter}"/>
- </MultiBinding.Bindings>
- </MultiBinding>
- </TextBlock.Visibility>
- </TextBlock>
- </Grid>
- </Grid>
- </hc:SimplePanel>
- </AdornerDecorator>
- <ResizeGrip Width="10" Height="10" x:Name="ResizeGrip" HorizontalAlignment="Right" VerticalAlignment="Bottom" Grid.Row="1" IsTabStop="False" Visibility="Collapsed" WindowChrome.ResizeGripDirection="BottomRight" />
- </hc:SimplePanel>
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsActive" Value="False">
- <Setter Property="Opacity" Value=".8" TargetName="ButtonPanel"/>
- </Trigger>
- <Trigger Property="WindowState" Value="Maximized">
- <Setter Property="Visibility" Value="Collapsed" TargetName="ButtonMax"/>
- <Setter Property="Visibility" Value="Visible" TargetName="ButtonRestore"/>
- </Trigger>
- <Trigger Property="WindowState" Value="Normal">
- <Setter Property="Visibility" Value="Visible" TargetName="ButtonMax"/>
- <Setter Property="Visibility" Value="Collapsed" TargetName="ButtonRestore"/>
- </Trigger>
- <Trigger Property="ResizeMode" Value="NoResize">
- <Setter Property="Visibility" Value="Collapsed" TargetName="ButtonMin"/>
- <Setter Property="Visibility" Value="Collapsed" TargetName="ButtonMax"/>
- <Setter Property="Visibility" Value="Collapsed" TargetName="ButtonRestore"/>
- </Trigger>
- <Trigger Property="ResizeMode" Value="CanMinimize">
- <Setter Property="Visibility" Value="Collapsed" TargetName="ButtonMax"/>
- <Setter Property="Visibility" Value="Collapsed" TargetName="ButtonRestore"/>
- </Trigger>
- <Trigger Property="IsMouseOver" Value="True" SourceName="ButtonClose">
- <Setter Property="Background" TargetName="ButtonClose" Value="{Binding CloseButtonHoverBackground,RelativeSource={RelativeSource TemplatedParent}}"/>
- <Setter Property="Foreground" TargetName="ButtonClose" Value="{Binding CloseButtonHoverForeground,RelativeSource={RelativeSource TemplatedParent}}"/>
- </Trigger>
- <Trigger Property="IsMouseOver" Value="True" SourceName="ButtonMax">
- <Setter Property="Background" TargetName="ButtonMax" Value="{Binding OtherButtonHoverBackground,RelativeSource={RelativeSource TemplatedParent}}"/>
- <Setter Property="Foreground" TargetName="ButtonMax" Value="{Binding OtherButtonHoverForeground,RelativeSource={RelativeSource TemplatedParent}}"/>
- </Trigger>
- <Trigger Property="IsMouseOver" Value="True" SourceName="ButtonRestore">
- <Setter Property="Background" TargetName="ButtonRestore" Value="{Binding OtherButtonHoverBackground,RelativeSource={RelativeSource TemplatedParent}}"/>
- <Setter Property="Foreground" TargetName="ButtonRestore" Value="{Binding OtherButtonHoverForeground,RelativeSource={RelativeSource TemplatedParent}}"/>
- </Trigger>
- <Trigger Property="IsMouseOver" Value="True" SourceName="ButtonMin">
- <Setter Property="Background" TargetName="ButtonMin" Value="{Binding OtherButtonHoverBackground,RelativeSource={RelativeSource TemplatedParent}}"/>
- <Setter Property="Foreground" TargetName="ButtonMin" Value="{Binding OtherButtonHoverForeground,RelativeSource={RelativeSource TemplatedParent}}"/>
- </Trigger>
- <Trigger Property="WindowStyle" Value="None">
- <Setter Property="ShowNonClientArea" Value="False"/>
- </Trigger>
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="ResizeMode" Value="CanResizeWithGrip"/>
- <Condition Property="WindowState" Value="Normal" />
- </MultiTrigger.Conditions>
- <Setter TargetName="ResizeGrip" Property="Visibility" Value="Visible" />
- </MultiTrigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- <Style x:Key="WindowWin10" TargetType="hc:Window">
- <Setter Property="BorderThickness" Value="1"/>
- <Setter Property="BorderBrush" Value="#262e2f"/>
- <Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}"/>
- <Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
- <Setter Property="UseLayoutRounding" Value="True"/>
- <Setter Property="NonClientAreaBackground" Value="{DynamicResource RegionBrush}"/>
- <Setter Property="NonClientAreaForeground" Value="{DynamicResource PrimaryTextBrush}"/>
- <Setter Property="CloseButtonBackground" Value="Transparent"/>
- <Setter Property="CloseButtonForeground" Value="{DynamicResource PrimaryTextBrush}"/>
- <Setter Property="CloseButtonHoverBackground" Value="#e81123"/>
- <Setter Property="CloseButtonHoverForeground" Value="White"/>
- <Setter Property="OtherButtonBackground" Value="Transparent"/>
- <Setter Property="OtherButtonForeground" Value="{DynamicResource PrimaryTextBrush}"/>
- <Setter Property="OtherButtonHoverBackground" Value="{DynamicResource DarkMaskBrush}"/>
- <Setter Property="OtherButtonHoverForeground" Value="{DynamicResource PrimaryTextBrush}"/>
- <Setter Property="Template" Value="{StaticResource WindowWin10Template}"/>
- <Style.Triggers>
- <Trigger Property="hc:WindowAttach.ExtendContentToNonClientArea" Value="true">
- <Setter Property="Template" Value="{StaticResource WindowWin10ExtendContentToNonClientTemplate}"/>
- </Trigger>
- </Style.Triggers>
- </Style>
- <Style x:Key="WindowBlur" BasedOn="{StaticResource WindowWin10}" TargetType="hc:BlurWindow">
- <Setter Property="Background" Value="Transparent"/>
- </Style>
- <Style x:Key="WindowGlow" BasedOn="{StaticResource WindowWin10}" TargetType="hc:GlowWindow">
- <Setter Property="ActiveGlowColor" Value="#262e2f"/>
- <Setter Property="InactiveGlowColor" Value="{DynamicResource BorderColor}"/>
- <Setter Property="BorderThickness" Value="0"/>
- </Style>
- <Style TargetType="hc:ImageBrowser">
- <Setter Property="Background" Value="Transparent"/>
- <Setter Property="MinWidth" Value="400"/>
- <Setter Property="MinHeight" Value="250"/>
- <Setter Property="BorderThickness" Value="1"/>
- <Setter Property="BorderBrush" Value="Black"/>
- <Setter Property="ResizeMode" Value="NoResize"/>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="hc:ImageBrowser">
- <ControlTemplate.Resources>
- <Storyboard x:Key="Storyboard1">
- <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="PART_PanelTop">
- <EasingDoubleKeyFrame KeyTime="0:0:.1" Value="1"/>
- </DoubleAnimationUsingKeyFrames>
- </Storyboard>
- <Storyboard x:Key="Storyboard2">
- <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="PART_PanelTop">
- <EasingDoubleKeyFrame KeyTime="0:0:.4" Value="0"/>
- </DoubleAnimationUsingKeyFrames>
- </Storyboard>
- </ControlTemplate.Resources>
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition/>
- <RowDefinition Height="Auto"/>
- </Grid.RowDefinitions>
- <hc:ImageViewer x:Name="PART_ImageViewer" ShowImgMap="True" BorderThickness="0" Background="#dd000000"/>
- <hc:SimplePanel x:Name="PART_PanelTop" Opacity="0" Background="{DynamicResource DarkOpacityBrush}" VerticalAlignment="Top" Grid.Row="0">
- <StackPanel HorizontalAlignment="Left" VerticalAlignment="Center" Orientation="Horizontal">
- <TextBlock Text="{Binding ImgPath,ElementName=PART_ImageViewer}" Foreground="White" Margin="10,0,0,0"/>
- <TextBlock Text="{Binding ImgSize,ElementName=PART_ImageViewer,Converter={StaticResource Long2FileSizeConverter}}" Foreground="White" Margin="30,0,0,0"/>
- </StackPanel>
- <Button Command="interactivity:ControlCommands.Close" Foreground="{DynamicResource TextIconBrush}" WindowChrome.IsHitTestVisibleInChrome="True" Background="Red" Padding="14" hc:IconElement.Geometry="{StaticResource DeleteGeometry}" Style="{StaticResource ButtonIcon}" HorizontalAlignment="Right" VerticalAlignment="Top" Width="40" Height="40"/>
- </hc:SimplePanel>
- </Grid>
- <ControlTemplate.Triggers>
- <Trigger SourceName="PART_ImageViewer" Property="ShowCloseButton" Value="True">
- <Trigger.EnterActions>
- <BeginStoryboard Storyboard="{StaticResource Storyboard1}"/>
- </Trigger.EnterActions>
- <Trigger.ExitActions>
- <BeginStoryboard Storyboard="{StaticResource Storyboard2}"/>
- </Trigger.ExitActions>
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- <Style.Triggers>
- <Trigger Property="IsFullScreen" Value="True">
- <Setter Property="WindowState" Value="Maximized"/>
- </Trigger>
- </Style.Triggers>
- </Style>
- </ResourceDictionary>
|