1 | <Window x:Class="Com.Piwigo.Wpf.MainWindow" |
---|
2 | xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
---|
3 | xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
---|
4 | xmlns:pwg="clr-namespace:Com.Piwigo.Wpf" |
---|
5 | xmlns:pwgcmd="clr-namespace:Com.Piwigo.Wpf.Command" |
---|
6 | Title="PiwigoWpf" |
---|
7 | WindowState="Maximized" |
---|
8 | MinHeight="600" MinWidth="800"> |
---|
9 | <Window.Resources> |
---|
10 | <LinearGradientBrush x:Key="WindowGradient" StartPoint="0,0.3" EndPoint="1,0"> |
---|
11 | <LinearGradientBrush.GradientStops> |
---|
12 | <GradientStop Color="#B2B6CAFF" Offset="0" /> |
---|
13 | <GradientStop Color="#BFC3D5FF" Offset="0.1" /> |
---|
14 | <GradientStop Color="#E0E4F0FF" Offset="0.3" /> |
---|
15 | <GradientStop Color="#E6EAF5FF" Offset="0.5" /> |
---|
16 | <GradientStop Color="#CFD7E2FF" Offset="0.6" /> |
---|
17 | <GradientStop Color="#BFC5D3FF" Offset="0.8" /> |
---|
18 | <GradientStop Color="#C4CBD8FF" Offset="1" /> |
---|
19 | </LinearGradientBrush.GradientStops> |
---|
20 | </LinearGradientBrush> |
---|
21 | |
---|
22 | <LinearGradientBrush x:Key="ListBoxGradient" StartPoint="0,0" EndPoint="0,1"> |
---|
23 | <LinearGradientBrush.GradientStops> |
---|
24 | <GradientStop Color="#90000000" Offset="0" /> |
---|
25 | <GradientStop Color="#40000000" Offset="0.005" /> |
---|
26 | <GradientStop Color="#10000000" Offset="0.04" /> |
---|
27 | <GradientStop Color="#20000000" Offset="0.945" /> |
---|
28 | <GradientStop Color="#60FFFFFF" Offset="1" /> |
---|
29 | </LinearGradientBrush.GradientStops> |
---|
30 | </LinearGradientBrush> |
---|
31 | |
---|
32 | <LinearGradientBrush x:Key="ShoppingCartGradient" StartPoint="0,0" EndPoint="0,1"> |
---|
33 | <LinearGradientBrush.GradientStops> |
---|
34 | <GradientStop Color="#90000000" Offset="0" /> |
---|
35 | <GradientStop Color="#40000000" Offset="0.002" /> |
---|
36 | <GradientStop Color="#10000000" Offset="0.02" /> |
---|
37 | <GradientStop Color="#20000000" Offset="0.98" /> |
---|
38 | <GradientStop Color="#60FFFFFF" Offset="1" /> |
---|
39 | </LinearGradientBrush.GradientStops> |
---|
40 | </LinearGradientBrush> |
---|
41 | |
---|
42 | <LinearGradientBrush x:Key="ReflectionGradient" StartPoint="0,1" EndPoint="0,0"> |
---|
43 | <LinearGradientBrush.GradientStops> |
---|
44 | <GradientStop Color="#50000000" Offset="0" /> |
---|
45 | <GradientStop Color="Transparent" Offset=".5" /> |
---|
46 | </LinearGradientBrush.GradientStops> |
---|
47 | </LinearGradientBrush> |
---|
48 | |
---|
49 | <LinearGradientBrush x:Key="ButtonGradient" StartPoint="0,0" EndPoint="0,1"> |
---|
50 | <LinearGradientBrush.GradientStops> |
---|
51 | <GradientStop Color="#FDB6CADF" Offset="0" /> |
---|
52 | <GradientStop Color="#FCC3C5FF" Offset="0.1" /> |
---|
53 | <GradientStop Color="#FCC4D0EF" Offset="0.3" /> |
---|
54 | <GradientStop Color="#FDB7C2DF" Offset="0.6" /> |
---|
55 | <GradientStop Color="#FE95B3CF" Offset="0.8" /> |
---|
56 | <GradientStop Color="#FE96AACF" Offset="1" /> |
---|
57 | </LinearGradientBrush.GradientStops> |
---|
58 | </LinearGradientBrush> |
---|
59 | |
---|
60 | <LinearGradientBrush x:Key="VerticalScrollGradient" StartPoint="0,0" EndPoint="1,0"> |
---|
61 | <LinearGradientBrush.GradientStops> |
---|
62 | <GradientStop Color="#FDB6CADF" Offset="0" /> |
---|
63 | <GradientStop Color="#FCC3C5FF" Offset="0.1" /> |
---|
64 | <GradientStop Color="#FCC4D0EF" Offset="0.3" /> |
---|
65 | <GradientStop Color="#FDB7C2DF" Offset="0.6" /> |
---|
66 | <GradientStop Color="#FE95B3CF" Offset="0.8" /> |
---|
67 | <GradientStop Color="#FE96AACF" Offset="1" /> |
---|
68 | </LinearGradientBrush.GradientStops> |
---|
69 | </LinearGradientBrush> |
---|
70 | |
---|
71 | <LinearGradientBrush x:Key="ComboBoxGradient" StartPoint="0,0" EndPoint="0,1"> |
---|
72 | <LinearGradientBrush.GradientStops> |
---|
73 | <GradientStop Color="#B2B6CAFF" Offset="0" /> |
---|
74 | <GradientStop Color="#B0B3C5FF" Offset="0.1" /> |
---|
75 | <GradientStop Color="#BEE4E0FF" Offset="0.3" /> |
---|
76 | <GradientStop Color="#B0D7E2FF" Offset="0.6" /> |
---|
77 | <GradientStop Color="#B0C5D3FF" Offset="0.8" /> |
---|
78 | <GradientStop Color="#C4CBD8FF" Offset="1" /> |
---|
79 | </LinearGradientBrush.GradientStops> |
---|
80 | </LinearGradientBrush> |
---|
81 | |
---|
82 | <LinearGradientBrush x:Key="GreetingCardGradient" StartPoint="0,0" EndPoint="0,1"> |
---|
83 | <LinearGradientBrush.GradientStops> |
---|
84 | <GradientStop Color="#EEEEEE" Offset="0" /> |
---|
85 | <GradientStop Color="#FFFFFF" Offset="1" /> |
---|
86 | </LinearGradientBrush.GradientStops> |
---|
87 | </LinearGradientBrush> |
---|
88 | |
---|
89 | <LinearGradientBrush x:Key="ButtonUpGradient" StartPoint="0,0" EndPoint="0,1"> |
---|
90 | <LinearGradientBrush.GradientStops> |
---|
91 | <GradientStop Color="Transparent" Offset="0" /> |
---|
92 | <GradientStop Color="#33000000" Offset="1" /> |
---|
93 | </LinearGradientBrush.GradientStops> |
---|
94 | </LinearGradientBrush> |
---|
95 | |
---|
96 | <LinearGradientBrush x:Key="ButtonDownGradient" StartPoint="0,0" EndPoint="0,1"> |
---|
97 | <LinearGradientBrush.GradientStops> |
---|
98 | <GradientStop Color="#10000000" Offset="0" /> |
---|
99 | <GradientStop Color="#20000000" Offset="1" /> |
---|
100 | </LinearGradientBrush.GradientStops> |
---|
101 | </LinearGradientBrush> |
---|
102 | |
---|
103 | <LinearGradientBrush x:Key="ButtonDisabledGradient" StartPoint="0,0" EndPoint="0,1"> |
---|
104 | <LinearGradientBrush.GradientStops> |
---|
105 | <GradientStop Color="#10302A90" Offset="0" /> |
---|
106 | <GradientStop Color="#10201040" Offset="1" /> |
---|
107 | </LinearGradientBrush.GradientStops> |
---|
108 | </LinearGradientBrush> |
---|
109 | |
---|
110 | <!-- STYLES --> |
---|
111 | |
---|
112 | <Style TargetType="{x:Type pwg:MainWindow}"> |
---|
113 | <Setter Property="Background" Value="{DynamicResource WindowGradient}" /> |
---|
114 | </Style> |
---|
115 | |
---|
116 | <Style x:Key="TitleText" TargetType="{x:Type TextBlock}" > |
---|
117 | <Setter Property="FontFamily" Value="Segoe Black" /> |
---|
118 | <Setter Property="FontSize" Value="20px" /> |
---|
119 | <Setter Property="Foreground" Value="MidnightBlue" /> |
---|
120 | </Style> |
---|
121 | |
---|
122 | <!-- DATA TEMPLATES --> |
---|
123 | |
---|
124 | <!--<DataTemplate DataType="{x:Type pd:ImageFile}"> |
---|
125 | <Border VerticalAlignment="Center" HorizontalAlignment="Center" Padding="4" Margin="2" Background="White"> |
---|
126 | <Image Source="{Binding Image}" /> |
---|
127 | </Border> |
---|
128 | </DataTemplate> |
---|
129 | |
---|
130 | <DataTemplate DataType="{x:Type pd:Print}"> |
---|
131 | <Border Margin="3" VerticalAlignment="Center" HorizontalAlignment="Center" Background="White" Padding="3" BorderBrush="#66000000" BorderThickness="1" MaxWidth="60" MaxHeight="60" > |
---|
132 | <Image Source="{Binding Photo}" /> |
---|
133 | </Border> |
---|
134 | </DataTemplate> |
---|
135 | |
---|
136 | <DataTemplate DataType="{x:Type pd:GreetingCard}"> |
---|
137 | <Grid Margin="3" > |
---|
138 | <Border VerticalAlignment="Center" HorizontalAlignment="Center" Background="{DynamicResource GreetingCardGradient}" Width="40" Height="50" BorderBrush="#44000000" BorderThickness="1" > |
---|
139 | <Border.RenderTransform> |
---|
140 | <SkewTransform AngleY="-10" /> |
---|
141 | </Border.RenderTransform> |
---|
142 | </Border> |
---|
143 | <Border VerticalAlignment="Center" HorizontalAlignment="Center" Background="White" Width="50" Height="50" BorderBrush="#66000000" BorderThickness="1" > |
---|
144 | <Image Margin="3" Source="{Binding Photo}" /> |
---|
145 | </Border> |
---|
146 | </Grid> |
---|
147 | </DataTemplate> |
---|
148 | |
---|
149 | <DataTemplate DataType="{x:Type pd:TShirt}"> |
---|
150 | <Grid Margin="3"> |
---|
151 | <Path VerticalAlignment="Center" HorizontalAlignment="Center" Fill="White" Stroke="#66000000" Data="M 0 9.6 L 24 0 L 40 0 L 64 9.6 L 62.4 24 L 51.2 24 L 51.2 56 L 12.8 56 L 12.8 24 L 1.6 24 Z "/> |
---|
152 | <Image Source="{Binding Photo}" MaxWidth="32" MaxHeight="36" VerticalAlignment="Center" HorizontalAlignment="Center"/> |
---|
153 | </Grid> |
---|
154 | </DataTemplate>--> |
---|
155 | |
---|
156 | <!-- PHOTOLIST TEMPLATE --> |
---|
157 | |
---|
158 | <Style x:Key="PhotoListStyle" TargetType="{x:Type ListBox}"> |
---|
159 | <Setter Property="Template"> |
---|
160 | <Setter.Value> |
---|
161 | <ControlTemplate TargetType="{x:Type ListBox}" > |
---|
162 | <Border |
---|
163 | BorderBrush="Gray" |
---|
164 | BorderThickness="1" |
---|
165 | CornerRadius="6" |
---|
166 | Background="{DynamicResource ListBoxGradient}" > |
---|
167 | <ScrollViewer |
---|
168 | VerticalScrollBarVisibility="Disabled" |
---|
169 | HorizontalScrollBarVisibility="Auto"> |
---|
170 | <StackPanel |
---|
171 | IsItemsHost="True" |
---|
172 | Orientation="Horizontal" |
---|
173 | HorizontalAlignment="Left" /> |
---|
174 | </ScrollViewer> |
---|
175 | </Border> |
---|
176 | </ControlTemplate> |
---|
177 | </Setter.Value> |
---|
178 | </Setter> |
---|
179 | </Style> |
---|
180 | |
---|
181 | <!-- PHOTOLIST STORYBOARDS --> |
---|
182 | |
---|
183 | <Style x:Key="PhotoListItem" TargetType="{x:Type ListBoxItem}"> |
---|
184 | <Setter Property="MaxHeight" Value="75" /> |
---|
185 | <Setter Property="MinHeight" Value="75" /> |
---|
186 | <Setter Property="Opacity" Value=".75" /> |
---|
187 | <Style.Triggers> |
---|
188 | <EventTrigger RoutedEvent="Mouse.MouseEnter"> |
---|
189 | <EventTrigger.Actions> |
---|
190 | <BeginStoryboard> |
---|
191 | <Storyboard> |
---|
192 | <DoubleAnimation |
---|
193 | Duration="0:0:0.2" |
---|
194 | Storyboard.TargetProperty="MaxHeight" |
---|
195 | To="85" /> |
---|
196 | <DoubleAnimation |
---|
197 | Duration="0:0:0.2" |
---|
198 | Storyboard.TargetProperty="Opacity" |
---|
199 | To="1.0" /> |
---|
200 | </Storyboard> |
---|
201 | </BeginStoryboard> |
---|
202 | </EventTrigger.Actions> |
---|
203 | </EventTrigger> |
---|
204 | |
---|
205 | <EventTrigger RoutedEvent="Mouse.MouseLeave"> |
---|
206 | <EventTrigger.Actions> |
---|
207 | <BeginStoryboard> |
---|
208 | <Storyboard> |
---|
209 | <DoubleAnimation |
---|
210 | Duration="0:0:1" |
---|
211 | Storyboard.TargetProperty="MaxHeight" /> |
---|
212 | <DoubleAnimation |
---|
213 | Duration="0:0:0.2" |
---|
214 | Storyboard.TargetProperty="Opacity" /> |
---|
215 | </Storyboard> |
---|
216 | </BeginStoryboard> |
---|
217 | </EventTrigger.Actions> |
---|
218 | </EventTrigger> |
---|
219 | </Style.Triggers> |
---|
220 | </Style> |
---|
221 | |
---|
222 | <!-- SHOPPING CART TEMPLATE --> |
---|
223 | |
---|
224 | <Style x:Key="ShoppingCartStyle" TargetType="{x:Type ListBox}"> |
---|
225 | <Setter Property="Template"> |
---|
226 | <Setter.Value> |
---|
227 | <ControlTemplate TargetType="{x:Type ListBox}" > |
---|
228 | <Border |
---|
229 | BorderBrush="Gray" |
---|
230 | BorderThickness="1" |
---|
231 | CornerRadius="6" |
---|
232 | Background="{DynamicResource ShoppingCartGradient}" > |
---|
233 | <ScrollViewer> |
---|
234 | <WrapPanel |
---|
235 | ItemHeight="70" |
---|
236 | ItemWidth="70" |
---|
237 | Margin="0,25,0,0" |
---|
238 | IsItemsHost="True" |
---|
239 | Orientation="Horizontal" |
---|
240 | HorizontalAlignment="Center" /> |
---|
241 | </ScrollViewer> |
---|
242 | </Border> |
---|
243 | </ControlTemplate> |
---|
244 | </Setter.Value> |
---|
245 | </Setter> |
---|
246 | </Style> |
---|
247 | |
---|
248 | <!-- SHOPPING CART TRIGGERS --> |
---|
249 | |
---|
250 | <Style x:Key="ShoppingCartItem" TargetType="{x:Type ListBoxItem}"> |
---|
251 | <Setter Property="BorderBrush" Value="Transparent" /> |
---|
252 | <Setter Property="Template"> |
---|
253 | <Setter.Value> |
---|
254 | <ControlTemplate TargetType="{x:Type ListBoxItem}"> |
---|
255 | <Border |
---|
256 | x:Name="ContentBorder" |
---|
257 | Opacity="0.85"> |
---|
258 | <ContentPresenter /> |
---|
259 | </Border> |
---|
260 | <ControlTemplate.Triggers> |
---|
261 | <Trigger Property="IsSelected" Value="True"> |
---|
262 | <Setter |
---|
263 | TargetName="ContentBorder" |
---|
264 | Property="Opacity" |
---|
265 | Value="1.0" /> |
---|
266 | </Trigger> |
---|
267 | </ControlTemplate.Triggers> |
---|
268 | </ControlTemplate> |
---|
269 | </Setter.Value> |
---|
270 | </Setter> |
---|
271 | </Style> |
---|
272 | |
---|
273 | <!-- BUTTON TEMPLATE --> |
---|
274 | |
---|
275 | <Style TargetType="{x:Type Button}"> |
---|
276 | <Setter Property="Template"> |
---|
277 | <Setter.Value> |
---|
278 | <ControlTemplate TargetType="{x:Type Button}"> |
---|
279 | <Border x:Name="OuterBorder" |
---|
280 | CornerRadius="3" |
---|
281 | Background="{DynamicResource ButtonGradient}"> |
---|
282 | <Border |
---|
283 | x:Name="InnerBorder" |
---|
284 | CornerRadius="3" |
---|
285 | Background="{DynamicResource ButtonUpGradient}" |
---|
286 | Padding="{TemplateBinding Padding}"> |
---|
287 | <ContentPresenter x:Name="ContentSite" |
---|
288 | HorizontalAlignment="Center" |
---|
289 | VerticalAlignment="Center" /> |
---|
290 | </Border> |
---|
291 | </Border> |
---|
292 | <ControlTemplate.Triggers> |
---|
293 | <Trigger Property="IsPressed" Value="true"> |
---|
294 | <Setter TargetName="InnerBorder" Property="Background" Value="{DynamicResource ButtonDownGradient}" /> |
---|
295 | </Trigger> |
---|
296 | <Trigger Property="IsEnabled" Value="false"> |
---|
297 | <Setter TargetName="InnerBorder" Property="Background" Value="{DynamicResource ButtonDisabledGradient}" /> |
---|
298 | <Setter Property="BorderBrush" Value="Silver" /> |
---|
299 | <Setter Property="Foreground" Value="SlateGray" /> |
---|
300 | </Trigger> |
---|
301 | </ControlTemplate.Triggers> |
---|
302 | </ControlTemplate> |
---|
303 | </Setter.Value> |
---|
304 | </Setter> |
---|
305 | <Setter Property="Height" Value="18" /> |
---|
306 | <Setter Property="Foreground" Value="MidnightBlue" /> |
---|
307 | </Style> |
---|
308 | |
---|
309 | <!-- COMBOBOX STYLE --> |
---|
310 | |
---|
311 | <Style TargetType="{x:Type ComboBox}" > |
---|
312 | <Setter Property="Background" Value="{DynamicResource ComboBoxGradient}" /> |
---|
313 | <Setter Property="BorderThickness" Value="0" /> |
---|
314 | <Setter Property="Height" Value="18px" /> |
---|
315 | <Setter Property="Foreground" Value="MidnightBlue" /> |
---|
316 | </Style> |
---|
317 | |
---|
318 | <!-- PROGRESS BAR STYLE --> |
---|
319 | |
---|
320 | <Style TargetType="{x:Type ProgressBar}" > |
---|
321 | <Setter Property="Background" Value="{DynamicResource ComboBoxGradient}" /> |
---|
322 | <Setter Property="BorderThickness" Value="1" /> |
---|
323 | <Setter Property="BorderBrush" Value="Gray" /> |
---|
324 | <Setter Property="Foreground" Value="MidnightBlue" /> |
---|
325 | </Style> |
---|
326 | |
---|
327 | <!-- SCROLLBAR TEMPLATES --> |
---|
328 | |
---|
329 | <Style x:Key="Scrollbar_LineButton" TargetType="{x:Type RepeatButton}"> |
---|
330 | <Setter Property="Template"> |
---|
331 | <Setter.Value> |
---|
332 | <ControlTemplate TargetType="{x:Type RepeatButton}"> |
---|
333 | <Border |
---|
334 | BorderBrush="Transparent" |
---|
335 | BorderThickness="1" |
---|
336 | CornerRadius="6" |
---|
337 | Background="{DynamicResource ButtonGradient}"> |
---|
338 | <ContentPresenter x:Name="ContentSite" /> |
---|
339 | </Border> |
---|
340 | </ControlTemplate> |
---|
341 | </Setter.Value> |
---|
342 | </Setter> |
---|
343 | <Setter Property="MinHeight" Value="12" /> |
---|
344 | <Setter Property="MinWidth" Value="12" /> |
---|
345 | <Setter Property="Foreground" Value="Gray" /> |
---|
346 | <Setter Property="FontSize" Value="6pt" /> |
---|
347 | <Setter Property="FontWeight" Value="Bold" /> |
---|
348 | <Setter Property="FontFamily" Value="Lucida Sans" /> |
---|
349 | <Setter Property="VerticalAlignment" Value="Center" /> |
---|
350 | <Setter Property="HorizontalAlignment" Value="Center" /> |
---|
351 | </Style> |
---|
352 | |
---|
353 | <Style x:Key="ScrollBar_TrackRepeater" TargetType="{x:Type RepeatButton}"> |
---|
354 | <Setter Property="IsTabStop" Value="false" /> |
---|
355 | <Setter Property="Focusable" Value="false" /> |
---|
356 | <Setter Property="Command" Value="ScrollBar.PageUpCommand" /> |
---|
357 | <Setter Property="Template"> |
---|
358 | <Setter.Value> |
---|
359 | <ControlTemplate TargetType="{x:Type RepeatButton}"> |
---|
360 | <Rectangle Fill="Transparent" /> |
---|
361 | </ControlTemplate> |
---|
362 | </Setter.Value> |
---|
363 | </Setter> |
---|
364 | </Style> |
---|
365 | |
---|
366 | <Style x:Key="ScrollBar_UpTrack" BasedOn="{StaticResource ScrollBar_TrackRepeater}" TargetType="{x:Type RepeatButton}"> |
---|
367 | <Setter Property="Command" Value="ScrollBar.PageUpCommand" /> |
---|
368 | </Style> |
---|
369 | |
---|
370 | <Style x:Key="ScrollBar_DownTrack" BasedOn="{StaticResource ScrollBar_TrackRepeater}" TargetType="{x:Type RepeatButton}"> |
---|
371 | <Setter Property="Command" Value="ScrollBar.PageDownCommand" /> |
---|
372 | </Style> |
---|
373 | |
---|
374 | <Style x:Key="ScrollBar_LeftTrack" BasedOn="{StaticResource ScrollBar_TrackRepeater}" TargetType="{x:Type RepeatButton}"> |
---|
375 | <Setter Property="Command" Value="ScrollBar.PageLeftCommand" /> |
---|
376 | </Style> |
---|
377 | |
---|
378 | <Style x:Key="ScrollBar_RightTrack" BasedOn="{StaticResource ScrollBar_TrackRepeater}" TargetType="{x:Type RepeatButton}"> |
---|
379 | <Setter Property="Command" Value="ScrollBar.PageRightCommand" /> |
---|
380 | </Style> |
---|
381 | |
---|
382 | <Style x:Key="ScrollBar_VerticalThumb" TargetType="{x:Type Thumb}"> |
---|
383 | <Setter Property="Template"> |
---|
384 | <Setter.Value> |
---|
385 | <ControlTemplate TargetType="{x:Type Thumb}"> |
---|
386 | <Border CornerRadius="6" |
---|
387 | BorderBrush="Transparent" |
---|
388 | BorderThickness="1" |
---|
389 | Background="{DynamicResource VerticalScrollGradient}" /> |
---|
390 | </ControlTemplate> |
---|
391 | </Setter.Value> |
---|
392 | </Setter> |
---|
393 | <Setter Property="MinHeight" Value="10" /> |
---|
394 | <Setter Property="MinWidth" Value="10" /> |
---|
395 | </Style> |
---|
396 | |
---|
397 | <Style x:Key="ScrollBar_HorizontalThumb" TargetType="{x:Type Thumb}"> |
---|
398 | <Setter Property="Template"> |
---|
399 | <Setter.Value> |
---|
400 | <ControlTemplate TargetType="{x:Type Thumb}"> |
---|
401 | <Border CornerRadius="6" |
---|
402 | BorderBrush="Transparent" |
---|
403 | BorderThickness="1" |
---|
404 | Background="{DynamicResource ButtonGradient}" /> |
---|
405 | </ControlTemplate> |
---|
406 | </Setter.Value> |
---|
407 | </Setter> |
---|
408 | <Setter Property="MinHeight" Value="10" /> |
---|
409 | <Setter Property="MinWidth" Value="10" /> |
---|
410 | </Style> |
---|
411 | |
---|
412 | <Style TargetType="{x:Type ScrollBar}"> |
---|
413 | <Setter Property="Background" Value="Transparent" /> |
---|
414 | <Setter Property="MinWidth" Value="10" /> |
---|
415 | <Setter Property="Template"> |
---|
416 | <Setter.Value> |
---|
417 | <ControlTemplate TargetType="{x:Type ScrollBar}"> |
---|
418 | <Grid> |
---|
419 | <Grid.ColumnDefinitions> |
---|
420 | <ColumnDefinition Width="10"/> |
---|
421 | </Grid.ColumnDefinitions> |
---|
422 | <Grid.RowDefinitions> |
---|
423 | <RowDefinition Height="10" /> |
---|
424 | <RowDefinition Height="*"/> |
---|
425 | <RowDefinition Height="10" /> |
---|
426 | </Grid.RowDefinitions> |
---|
427 | <Border Grid.Row="1" BorderThickness="0" Background="Transparent" CornerRadius="4"/> |
---|
428 | <RepeatButton Grid.Row="0" Style="{DynamicResource Scrollbar_LineButton}" Command="ScrollBar.LineUpCommand" Content=" ^" /> |
---|
429 | <Track Grid.Row="1" Name="PART_Track" IsDirectionReversed="True"> |
---|
430 | <Track.IncreaseRepeatButton> |
---|
431 | <RepeatButton Style="{DynamicResource ScrollBar_DownTrack}"/> |
---|
432 | </Track.IncreaseRepeatButton> |
---|
433 | <Track.DecreaseRepeatButton> |
---|
434 | <RepeatButton Style="{DynamicResource ScrollBar_UpTrack}"/> |
---|
435 | </Track.DecreaseRepeatButton> |
---|
436 | <Track.Thumb> |
---|
437 | <Thumb Style="{DynamicResource ScrollBar_VerticalThumb}"/> |
---|
438 | </Track.Thumb> |
---|
439 | </Track> |
---|
440 | <RepeatButton Grid.Row="2" Style="{DynamicResource Scrollbar_LineButton}" Command="ScrollBar.LineDownCommand" Content=" v" /> |
---|
441 | </Grid> |
---|
442 | </ControlTemplate> |
---|
443 | </Setter.Value> |
---|
444 | </Setter> |
---|
445 | <Style.Triggers> |
---|
446 | <Trigger Property="Orientation" Value="Horizontal" > |
---|
447 | <Setter Property="Background" Value="Transparent" /> |
---|
448 | <Setter Property="MinHeight" Value="10" /> |
---|
449 | <Setter Property="Template"> |
---|
450 | <Setter.Value> |
---|
451 | <ControlTemplate TargetType="{x:Type ScrollBar}"> |
---|
452 | <Grid> |
---|
453 | <Grid.RowDefinitions> |
---|
454 | <RowDefinition Height="12"/> |
---|
455 | </Grid.RowDefinitions> |
---|
456 | <Grid.ColumnDefinitions> |
---|
457 | <ColumnDefinition Width="12" /> |
---|
458 | <ColumnDefinition Width="*"/> |
---|
459 | <ColumnDefinition Width="12" /> |
---|
460 | </Grid.ColumnDefinitions> |
---|
461 | <Border Grid.Column="1" BorderThickness="0" Background="Transparent" CornerRadius="4"/> |
---|
462 | <RepeatButton Grid.Column="0" Style="{DynamicResource Scrollbar_LineButton}" Command="ScrollBar.LineLeftCommand" Content=" <" /> |
---|
463 | <Track Grid.Column="1" Name="PART_Track"> |
---|
464 | <Track.IncreaseRepeatButton> |
---|
465 | <RepeatButton Style="{DynamicResource ScrollBar_RightTrack}"/> |
---|
466 | </Track.IncreaseRepeatButton> |
---|
467 | <Track.DecreaseRepeatButton> |
---|
468 | <RepeatButton Style="{DynamicResource ScrollBar_LeftTrack}"/> |
---|
469 | </Track.DecreaseRepeatButton> |
---|
470 | <Track.Thumb> |
---|
471 | <Thumb Style="{DynamicResource ScrollBar_HorizontalThumb}"/> |
---|
472 | </Track.Thumb> |
---|
473 | </Track> |
---|
474 | <RepeatButton Grid.Column="2" Style="{DynamicResource Scrollbar_LineButton}" Command="ScrollBar.LineRightCommand" Content=" >" /> |
---|
475 | |
---|
476 | </Grid> |
---|
477 | </ControlTemplate> |
---|
478 | </Setter.Value> |
---|
479 | </Setter> |
---|
480 | </Trigger> |
---|
481 | </Style.Triggers> |
---|
482 | </Style> |
---|
483 | </Window.Resources> |
---|
484 | <DockPanel Name="mainDockPanel" Margin="5"> |
---|
485 | <StackPanel Name="headerStackPanel" DockPanel.Dock="Top" Orientation="Vertical"> |
---|
486 | <Image Name="ImgPiwigoLogo" MinHeight="50" MinWidth="50" |
---|
487 | Source="pack://application:,,,/Pictures/PiwigoLogo.png" |
---|
488 | ToolTip="www.piwigo.org" Stretch="None" /> |
---|
489 | <StackPanel Name="connectStackPanel" Orientation="Horizontal" VerticalAlignment="Center" Margin="5" |
---|
490 | DataContext="{Binding Source={StaticResource Session}}"> |
---|
491 | <Label Content="User" Name="LblUsr" /> |
---|
492 | <TextBox Height="23" Name="BbUsr" Width="120" Text="{Binding Path=UserName, Mode=TwoWay}" /> |
---|
493 | <Label Content="Password" Name="LblPwd" /> |
---|
494 | <TextBox Height="23" Name="TbPwd" Width="120" Text="{Binding Path=Password, Mode=TwoWay}"/> |
---|
495 | <Label Content="Url" Name="LblUrl" /> |
---|
496 | <TextBox Height="23" Name="TbUrl" Width="300" Text="{Binding Path=ServeurName, Mode=TwoWay}"/> |
---|
497 | <CheckBox VerticalAlignment="Center" IsChecked="{Binding Path=SaveSetting, Mode=TwoWay}">Save settings</CheckBox> |
---|
498 | <Button Margin="2" Command="{x:Static pwgcmd:PwgCmdProvider.PwgCmdConnect}">Go</Button> |
---|
499 | </StackPanel> |
---|
500 | <ProgressBar IsIndeterminate="True" /> |
---|
501 | </StackPanel> |
---|
502 | |
---|
503 | <ListView Name="listViewCategory" DockPanel.Dock="Left" MinWidth="100" /> |
---|
504 | <ListView Name="listViewImage" DockPanel.Dock="Right" MinWidth="500"/> |
---|
505 | </DockPanel> |
---|
506 | |
---|
507 | </Window> |
---|