-
Notifications
You must be signed in to change notification settings - Fork 4
/
SlideshowWindow.xaml
172 lines (167 loc) · 9.25 KB
/
SlideshowWindow.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
<local:BorderlessWindow x:Class="ZipImageViewer.SlideshowWindow" x:Name="SlideWin"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:ZipImageViewer" Background="Black" Foreground="{StaticResource ForegroundBrush}" Padding="0"
mc:Ignorable="d" Height="600" Width="800" Loaded="SlideWin_Loaded" Closing="SlideWin_Closing" Closed="SlideWin_Closed">
<Canvas x:Name="canvas" Cursor="None">
<Canvas.Resources>
<Style TargetType="local:DpiImage">
<Setter Property="RenderOptions.BitmapScalingMode" Value="HighQuality"/>
<Setter Property="Stretch" Value="Fill"/>
<Setter Property="Opacity" Value="0"/>
</Style>
<Style x:Key="HeaderStyle" TargetType="TextBlock" BasedOn="{StaticResource HeaderTextStyle}">
<Setter Property="Margin" Value="0 0 16 0"/>
</Style>
<Style TargetType="TextBox" BasedOn="{StaticResource BorderlessStyle}">
<Setter Property="MinWidth" Value="20" />
</Style>
<Style TargetType="ContentControl" BasedOn="{StaticResource RoundContentControlBaseStyle}"/>
</Canvas.Resources>
<Border x:Name="B_ControlPanel" Canvas.Top="40" Canvas.Right="10" CornerRadius="4" Background="Transparent" Cursor="Arrow"
Panel.ZIndex="99" MinWidth="260" MinHeight="260" MouseLeave="B_ControlPanel_MouseLeave">
<Border.Style>
<Style TargetType="Border">
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Trigger.EnterActions>
<BeginStoryboard Storyboard="{StaticResource SB_FadeIn}"/>
</Trigger.EnterActions>
<Trigger.ExitActions>
<BeginStoryboard Storyboard="{StaticResource SB_FadeOut}"/>
</Trigger.ExitActions>
</Trigger>
</Style.Triggers>
</Style>
</Border.Style>
<StackPanel>
<StackPanel.Resources>
<Style TargetType="Border" BasedOn="{StaticResource BorderBlockStyle}"/>
<Style TargetType="StackPanel">
<Setter Property="Orientation" Value="Horizontal" />
</Style>
<Style TargetType="CheckBox" BasedOn="{StaticResource SlideSwitchStyle}">
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="HorizontalAlignment" Value="Right" />
<Setter Property="Foreground" Value="{Binding Foreground, ElementName=SlideWin, Mode=OneTime}" />
<Setter Property="Width" Value="48" />
<Setter Property="Height" Value="24" />
</Style>
</StackPanel.Resources>
<StackPanel.Style>
<Style TargetType="StackPanel">
<Style.Triggers>
<DataTrigger Binding="{Binding Opacity, Mode=OneWay, RelativeSource={RelativeSource FindAncestor, AncestorType=Border}}" Value="0">
<Setter Property="Visibility" Value="Hidden"/>
</DataTrigger>
</Style.Triggers>
</Style>
</StackPanel.Style>
<Border>
<DockPanel>
<TextBlock Text="{StaticResource ttl_RandomOrder}" Style="{StaticResource HeaderStyle}"/>
<CheckBox IsChecked="{Binding SlideAnimConfig.RandomOrder, Source={x:Static local:App.Setting}}"/>
</DockPanel>
</Border>
<Border>
<DockPanel>
<TextBlock Text="{StaticResource ttl_Transition}" Style="{StaticResource HeaderStyle}"/>
<ContentControl>
<ComboBox ItemsSource="{Binding Source={local:Enumeration {x:Type local:SlideshowHelper+SlideTransition}}}"
SelectedValue="{Binding Source={x:Static local:App.Setting}, Path=SlideAnimConfig.Transition}"
DisplayMemberPath="Description" SelectedValuePath="Value"/>
</ContentControl>
</DockPanel>
</Border>
<Border>
<DockPanel>
<TextBlock Text="{StaticResource ttl_TransitionDelay}" Style="{StaticResource HeaderStyle}"/>
<ContentControl>
<TextBox Text="{Binding SlideAnimConfig.TransitionDelay, Source={x:Static local:App.Setting}}"/>
</ContentControl>
</DockPanel>
</Border>
<Border>
<DockPanel>
<TextBlock Text="{StaticResource ttl_ResolutionScale}" Style="{StaticResource HeaderStyle}"/>
<ContentControl>
<TextBox Text="{Binding SlideAnimConfig.ResolutionScale, Source={x:Static local:App.Setting}}"/>
</ContentControl>
</DockPanel>
</Border>
<Border>
<DockPanel>
<TextBlock Text="{StaticResource ttl_ImageDuration}" Style="{StaticResource HeaderStyle}"/>
<ContentControl>
<TextBox Text="{Binding SlideAnimConfig.ImageDuration, Source={x:Static local:App.Setting}}"/>
</ContentControl>
</DockPanel>
</Border>
<Border>
<DockPanel>
<TextBlock Text="{StaticResource ttl_FadeInDuration}" Style="{StaticResource HeaderStyle}"/>
<ContentControl>
<TextBox Text="{Binding SlideAnimConfig.FadeInDuration, Source={x:Static local:App.Setting}}"/>
</ContentControl>
</DockPanel>
</Border>
<Border>
<DockPanel>
<TextBlock Text="{StaticResource ttl_FadeOutDuration}" Style="{StaticResource HeaderStyle}"/>
<ContentControl>
<TextBox Text="{Binding SlideAnimConfig.FadeOutDuration, Source={x:Static local:App.Setting}}"/>
</ContentControl>
</DockPanel>
</Border>
<Border>
<DockPanel>
<TextBlock Text="{StaticResource ttl_Blur}" Style="{StaticResource HeaderStyle}"/>
<CheckBox IsChecked="{Binding SlideAnimConfig.Blur, Source={x:Static local:App.Setting}}"/>
</DockPanel>
</Border>
<Border>
<DockPanel>
<TextBlock Text="{StaticResource ttl_XAxisPanReduction}" Style="{StaticResource HeaderStyle}"/>
<ContentControl>
<TextBox Text="{Binding SlideAnimConfig.XPanDistanceR, Source={x:Static local:App.Setting}}"/>
</ContentControl>
</DockPanel>
</Border>
<Border>
<DockPanel>
<TextBlock Text="{StaticResource ttl_YAxisPanReduction}" Style="{StaticResource HeaderStyle}"/>
<ContentControl>
<TextBox Text="{Binding SlideAnimConfig.YPanDistanceR, Source={x:Static local:App.Setting}}"/>
</ContentControl>
</DockPanel>
</Border>
<Border>
<DockPanel>
<TextBlock Text="{StaticResource ttl_YAxisPanDownOnly}" Style="{StaticResource HeaderStyle}"/>
<CheckBox IsChecked="{Binding SlideAnimConfig.YPanDownOnly, Source={x:Static local:App.Setting}}"/>
</DockPanel>
</Border>
<Button Style="{StaticResource ButtonStyle}" Margin="10 8" Content="{StaticResource ttl_ResetTransDefault}"
Click="Btn_Preset_Click"/>
</StackPanel>
</Border>
<local:DpiImage x:Name="IM0">
<local:DpiImage.RenderTransform>
<TransformGroup>
<ScaleTransform/>
<TranslateTransform/>
</TransformGroup>
</local:DpiImage.RenderTransform>
</local:DpiImage>
<local:DpiImage x:Name="IM1">
<local:DpiImage.RenderTransform>
<TransformGroup>
<ScaleTransform/>
<TranslateTransform/>
</TransformGroup>
</local:DpiImage.RenderTransform>
</local:DpiImage>
</Canvas>
</local:BorderlessWindow>