跳到主要内容

github/tai

公开

Tai · Windows 软件与网站使用时长统计。上游 Planshit/Tai 的源码镜像,非灵栈原创;MIT 许可。来源:https://github.com/Planshit/Tai 。本次为手动同步,暂不提供安装包。

浏览文件

Common.xaml

706 行 · 31.0 KB历史下载
1<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
3 <!--上下文菜单样式-->
4 <Style TargetType="{x:Type ContextMenu}">
5 <Setter Property="Background" Value="White"/>
6 <!--<Setter Property="BorderBrush" Value="{DynamicResource FluentBorderBrush}"/>-->
7
8 <Setter Property="Padding" Value="0"/>
9 <Setter Property="Template">
10 <Setter.Value>
11 <ControlTemplate TargetType="{x:Type ContextMenu}">
12 <Grid>
13 <Border Margin="{Binding ElementName=Border,Path=Margin}" Background="{Binding ElementName=Border,Path=Background}" CornerRadius="{Binding ElementName=Border,Path=CornerRadius}">
14 <Border.Effect>
15 <DropShadowEffect ShadowDepth="0" Direction="0" BlurRadius="10" Opacity=".1" />
16 </Border.Effect>
17 </Border>
18 <Border x:Name="Border"
19 Background="{DynamicResource PopupBackgroundBrush}"
20 BorderBrush="{DynamicResource ContextBorderBrush}"
21 BorderThickness="1"
22 Padding="5"
23 Margin="10"
24 CornerRadius="8"
25 >
26 <!--<Border.Effect>
27 <DropShadowEffect ShadowDepth="0" Direction="0" BlurRadius="0" Opacity="0" />
28 </Border.Effect>-->
29 <ScrollViewer Focusable="false" Padding="0">
30
31 <ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
32
33 </ScrollViewer>
34 </Border>
35 </Grid>
36 </ControlTemplate>
37 </Setter.Value>
38 </Setter>
39 </Style>
40
41 <Style x:Key="{x:Type Menu}"
42 TargetType="{x:Type Menu}">
43 <Setter Property="OverridesDefaultStyle"
44 Value="True" />
45 <Setter Property="SnapsToDevicePixels"
46 Value="True" />
47 <Setter Property="Background"
48 Value="Transparent" />
49 <Setter Property="BorderThickness"
50 Value="0" />
51 <Setter Property="Template">
52 <Setter.Value>
53 <ControlTemplate TargetType="{x:Type Menu}">
54 <Border BorderThickness="{TemplateBinding BorderThickness}"
55 Background="{TemplateBinding Background}">
56
57 <StackPanel ClipToBounds="True"
58 Orientation="Horizontal"
59 IsItemsHost="True" />
60 </Border>
61 </ControlTemplate>
62 </Setter.Value>
63 </Setter>
64 </Style>
65 <!--#endregion-->
66 <!--#region MenuItem-->
67
68 <!--分割线-->
69 <Style x:Key="{x:Static MenuItem.SeparatorStyleKey}"
70 TargetType="{x:Type Separator}">
71 <Setter Property="Height"
72 Value="1" />
73 <Setter Property="Margin"
74 Value="45,5,15,5" />
75 <Setter Property="Template">
76 <Setter.Value>
77 <ControlTemplate TargetType="{x:Type Separator}">
78 <!--<Border BorderThickness="1">
79 <Border.BorderBrush>
80 <SolidColorBrush Color="#FFDEDEDE"/>
81 </Border.BorderBrush>
82 </Border>-->
83 <Rectangle Fill="{DynamicResource SeparatorBrush}"/>
84 </ControlTemplate>
85 </Setter.Value>
86 </Setter>
87 </Style>
88
89 <!-- TopLevelHeader 顶部一级菜单栏 -->
90 <ControlTemplate x:Key="{x:Static MenuItem.TopLevelHeaderTemplateKey}"
91 TargetType="{x:Type MenuItem}">
92 <Border x:Name="Border" Padding="0" Background="Transparent">
93 <Grid>
94 <ContentPresenter Margin="10,4"
95 ContentSource="Header"
96 RecognizesAccessKey="True" />
97 <Popup x:Name="Popup"
98 Placement="Bottom"
99 IsOpen="{TemplateBinding IsSubmenuOpen}"
100 AllowsTransparency="True"
101 Focusable="False"
102 PopupAnimation="Fade"
103 ScrollViewer.VerticalScrollBarVisibility="Hidden">
104 <Border x:Name="SubmenuBorder"
105 SnapsToDevicePixels="True"
106 BorderThickness="1"
107 Background="White"
108 BorderBrush="#2b20d9"
109 Margin="10"
110 CornerRadius="0"
111
112 >
113 <Border.Effect>
114 <DropShadowEffect BlurRadius="11" Opacity="0.2" Direction="218" RenderingBias="Quality" ShadowDepth="1"/>
115 </Border.Effect>
116
117 <ScrollViewer CanContentScroll="True"
118 >
119 <StackPanel IsItemsHost="True"
120 KeyboardNavigation.DirectionalNavigation="Cycle" />
121 </ScrollViewer>
122 </Border>
123 </Popup>
124 </Grid>
125 </Border>
126 <ControlTemplate.Triggers>
127 <Trigger Property="IsSuspendingPopupAnimation"
128 Value="true">
129 <Setter TargetName="Popup"
130 Property="PopupAnimation"
131 Value="None" />
132 </Trigger>
133 <Trigger Property="IsHighlighted"
134 Value="true">
135 <Setter TargetName="Border"
136 Property="BorderBrush"
137 Value="Transparent" />
138 <Setter Property="Background"
139 TargetName="Border" Value="{DynamicResource HoverBackgroundBrush}">
140
141 </Setter>
142 </Trigger>
143 <Trigger SourceName="Popup"
144 Property="AllowsTransparency"
145 Value="True">
146 <!--<Setter TargetName="SubmenuBorder"
147 Property="CornerRadius"
148 Value="0,0,4,4" />-->
149 <!--<Setter TargetName="SubmenuBorder"
150 Property="Padding"
151 Value="0,0,0,20" />-->
152 </Trigger>
153 <Trigger Property="IsEnabled"
154 Value="False">
155 <Setter Property="Foreground" Value="#ccc">
156
157 </Setter>
158 </Trigger>
159 </ControlTemplate.Triggers>
160 </ControlTemplate>
161
162 <!-- TopLevelItem -->
163 <ControlTemplate x:Key="{x:Static MenuItem.TopLevelItemTemplateKey}"
164 TargetType="{x:Type MenuItem}">
165 <Border x:Name="Border">
166 <Grid>
167 <ContentPresenter Margin="6,3,6,3"
168 ContentSource="Header"
169 RecognizesAccessKey="True" />
170 </Grid>
171 </Border>
172 <ControlTemplate.Triggers>
173 <Trigger Property="IsHighlighted"
174 Value="true">
175 <Setter Property="Background"
176 TargetName="Border" Value="red">
177
178 </Setter>
179 </Trigger>
180 <Trigger Property="IsEnabled"
181 Value="False">
182 <Setter Property="Foreground" Value="#ccc">
183
184 </Setter>
185 </Trigger>
186 </ControlTemplate.Triggers>
187 </ControlTemplate>
188
189 <!-- SubmenuItem -->
190 <ControlTemplate x:Key="{x:Static MenuItem.SubmenuItemTemplateKey}"
191 TargetType="{x:Type MenuItem}">
192 <Border x:Name="Border"
193 Background="{DynamicResource PopupBackgroundBrush}"
194 CornerRadius="5"
195 MinWidth="150"
196 Padding="0,6">
197 <Grid>
198 <Grid.ColumnDefinitions>
199 <ColumnDefinition Width="30"
200 SharedSizeGroup="Icon" />
201 <ColumnDefinition Width="20" />
202 <ColumnDefinition Width="Auto"
203 SharedSizeGroup="Shortcut" />
204 <ColumnDefinition Width="13" />
205 </Grid.ColumnDefinitions>
206
207 <ContentPresenter x:Name="Icon"
208
209 VerticalAlignment="Center"
210 TextElement.Foreground="{DynamicResource DefaultTextBrush}"
211 HorizontalAlignment="Center"
212 ContentSource="Icon" />
213 <Rectangle x:Name="CheckMark"
214 Grid.Column="1"
215 Fill="{DynamicResource ThemeBrush}"
216 Width="5"
217 Height="5"
218 RadiusX="5"
219 RadiusY="5"
220 VerticalAlignment="Center"
221 HorizontalAlignment="Center"
222 Visibility="Hidden"
223 SnapsToDevicePixels="True"/>
224 <ContentPresenter x:Name="HeaderHost"
225 Grid.Column="2"
226 ContentSource="Header"
227 Margin="0,0,10,0"
228 VerticalAlignment="Center"
229HorizontalAlignment="Left" RecognizesAccessKey="True" />
230 <TextBlock x:Name="InputGestureText"
231 Grid.Column="3"
232 FontWeight="Normal"
233 Text="{TemplateBinding InputGestureText}"
234 Margin="0"
235
236 DockPanel.Dock="Right" />
237 </Grid>
238 </Border>
239 <ControlTemplate.Triggers>
240 <Trigger Property="ButtonBase.Command"
241 Value="{x:Null}" />
242 <!--<Trigger Property="Icon"
243 Value="{x:Null}">
244 <Setter TargetName="Icon"
245 Property="Visibility"
246 Value="Hidden" />
247 </Trigger>-->
248 <Trigger Property="IsChecked"
249 Value="true">
250 <Setter TargetName="CheckMark"
251 Property="Visibility"
252 Value="Visible" />
253 </Trigger>
254
255 <Trigger Property="IsHighlighted"
256 Value="true">
257 <Setter Property="Background"
258 TargetName="Border" Value="{DynamicResource HoverBackgroundBrush}">
259
260 </Setter>
261 <!--<Setter Property="BorderBrush"
262 TargetName="Border">
263 <Setter.Value>
264 <LinearGradientBrush EndPoint="0.5,1"
265 StartPoint="0.5,0">
266 <GradientStop Color="{DynamicResource BorderMediumColor}"
267 Offset="0" />
268 <GradientStop Color="Transparent"
269 Offset="1" />
270 </LinearGradientBrush>
271 </Setter.Value>
272 </Setter>-->
273 </Trigger>
274 <Trigger Property="IsEnabled"
275 Value="false">
276 <Setter Property="Foreground" Value="#ccc">
277
278 </Setter>
279 </Trigger>
280 </ControlTemplate.Triggers>
281 </ControlTemplate>
282
283 <!--二级菜单样式-->
284 <ControlTemplate x:Key="{x:Static MenuItem.SubmenuHeaderTemplateKey}"
285 TargetType="{x:Type MenuItem}">
286 <Border x:Name="Border"
287 BorderThickness="0"
288 MinWidth="150"
289 Padding="0,6"
290 Background="{DynamicResource PopupBackgroundBrush}"
291 CornerRadius="5">
292 <Grid>
293 <Grid.ColumnDefinitions>
294 <ColumnDefinition Width="20"
295 SharedSizeGroup="Icon" />
296 <ColumnDefinition Width="20" />
297 <ColumnDefinition Width="Auto" />
298
299 <ColumnDefinition Width="13" />
300 </Grid.ColumnDefinitions>
301 <ContentPresenter x:Name="Icon"
302 Margin="6,0,6,0"
303 VerticalAlignment="Center"
304 ContentSource="Icon" />
305 <Rectangle x:Name="CheckMark"
306 Grid.Column="1"
307 Fill="{DynamicResource ThemeBrush}"
308 Width="5"
309 Height="5"
310 VerticalAlignment="Center"
311 HorizontalAlignment="Center"
312 Visibility="Hidden"
313 SnapsToDevicePixels="True"/>
314 <ContentPresenter x:Name="HeaderHost"
315 Grid.Column="2"
316 ContentSource="Header"
317 RecognizesAccessKey="True"
318 Margin="0,0,0,0"/>
319 <!--<TextBlock x:Name="InputGestureText"
320 Grid.Column="2"
321 Text="{TemplateBinding InputGestureText}"
322 Margin="0"
323 FontWeight="Normal"
324 DockPanel.Dock="Right" />-->
325 <Path Grid.Column="3"
326 HorizontalAlignment="Center"
327 VerticalAlignment="Center"
328 Data="M 0 0 L 0 7 L 4 3.5 Z"
329 Margin="10,0,0,0">
330 <Path.Fill>
331 <SolidColorBrush Color="{DynamicResource ThemeColor}" />
332 </Path.Fill>
333 </Path>
334 <Popup x:Name="Popup"
335 Placement="Right"
336 HorizontalOffset="0"
337 VerticalOffset="-5"
338 IsOpen="{TemplateBinding IsSubmenuOpen}"
339 AllowsTransparency="True"
340 Focusable="False"
341 PopupAnimation="Fade">
342 <Grid>
343 <Border Margin="13" Background="{DynamicResource PopupBackgroundBrush}" CornerRadius="5">
344 <Border.Effect>
345 <DropShadowEffect ShadowDepth="0" Direction="0" BlurRadius="15" Opacity=".3" />
346 </Border.Effect>
347 </Border>
348 <Border x:Name="SubmenuBorder"
349 SnapsToDevicePixels="True"
350 Background="{DynamicResource PopupBackgroundBrush}"
351 CornerRadius="5"
352 BorderThickness="1"
353 BorderBrush="{DynamicResource ContextBorderBrush}"
354
355 Margin="10">
356
357 <ScrollViewer CanContentScroll="True"
358 >
359 <StackPanel IsItemsHost="True"
360 KeyboardNavigation.DirectionalNavigation="Cycle" Margin="5"/>
361 </ScrollViewer>
362 </Border>
363 </Grid>
364
365 </Popup>
366 </Grid>
367 </Border>
368 <ControlTemplate.Triggers>
369 <Trigger Property="Icon"
370 Value="{x:Null}">
371 <Setter TargetName="Icon"
372 Property="Visibility"
373 Value="Collapsed" />
374 </Trigger>
375 <Trigger Property="IsChecked"
376 Value="true">
377 <Setter TargetName="CheckMark"
378 Property="Visibility"
379 Value="Visible" />
380 </Trigger>
381 <Trigger Property="IsHighlighted"
382 Value="true">
383 <Setter Property="Background"
384 TargetName="Border" Value="{DynamicResource HoverBackgroundBrush}">
385 </Setter>
386 </Trigger>
387 <Trigger SourceName="Popup"
388 Property="AllowsTransparency"
389 Value="True">
390 <Setter TargetName="SubmenuBorder"
391 Property="Padding"
392 Value="0" />
393 </Trigger>
394 <Trigger Property="IsEnabled"
395 Value="false">
396 <Setter Property="Foreground" Value="#ccc">
397 </Setter>
398 </Trigger>
399 </ControlTemplate.Triggers>
400 </ControlTemplate>
401
402 <!-- MenuItem Style -->
403 <Style x:Key="{x:Type MenuItem}"
404 TargetType="{x:Type MenuItem}">
405
406 <Setter Property="OverridesDefaultStyle"
407 Value="True" />
408 <Setter Property="Foreground" Value="{DynamicResource DefaultTextBrush}"/>
409 <Style.Triggers>
410 <Trigger Property="Role"
411 Value="TopLevelHeader">
412 <Setter Property="Template"
413 Value="{StaticResource {x:Static MenuItem.TopLevelHeaderTemplateKey}}" />
414 <Setter Property="Grid.IsSharedSizeScope"
415 Value="true" />
416 </Trigger>
417 <Trigger Property="Role"
418 Value="TopLevelItem">
419 <Setter Property="Template"
420 Value="{StaticResource {x:Static MenuItem.TopLevelItemTemplateKey}}" />
421 </Trigger>
422 <Trigger Property="Role"
423 Value="SubmenuHeader">
424 <Setter Property="Template"
425 Value="{StaticResource {x:Static MenuItem.SubmenuHeaderTemplateKey}}" />
426 </Trigger>
427 <Trigger Property="Role"
428 Value="SubmenuItem">
429 <Setter Property="Template"
430 Value="{StaticResource {x:Static MenuItem.SubmenuItemTemplateKey}}" />
431 </Trigger>
432 </Style.Triggers>
433 </Style>
434
435 <!--滚动条样式-->
436 <Style x:Key="ScrollBarThumb"
437 TargetType="{x:Type Thumb}">
438 <Setter Property="OverridesDefaultStyle"
439 Value="true"/>
440 <Setter Property="IsTabStop"
441 Value="false"/>
442 <Setter Property="Template">
443 <Setter.Value>
444 <ControlTemplate TargetType="{x:Type Thumb}">
445 <Grid>
446 <Rectangle
447 x:Name="Bar"
448 Fill="{DynamicResource ScrollBarBrush}"
449 RadiusX="4"
450 RadiusY="4"/>
451 </Grid>
452 <ControlTemplate.Triggers>
453 <Trigger Property="IsMouseOver" Value="True">
454 <Setter TargetName="Bar" Property="Fill" Value="{DynamicResource ThemeBrush}" />
455 </Trigger>
456 </ControlTemplate.Triggers>
457 </ControlTemplate>
458
459 </Setter.Value>
460 </Setter>
461 </Style>
462 <Style x:Key="HorizontalScrollBarPageButton"
463 TargetType="{x:Type RepeatButton}">
464 <Setter Property="OverridesDefaultStyle"
465 Value="true"/>
466 <Setter Property="Background"
467 Value="Transparent"/>
468 <Setter Property="Focusable"
469 Value="false"/>
470 <Setter Property="IsTabStop"
471 Value="false"/>
472 <Setter Property="Opacity"
473 Value="0"/>
474 <Setter Property="Template">
475 <Setter.Value>
476 <ControlTemplate TargetType="{x:Type RepeatButton}">
477 <Rectangle Fill="{TemplateBinding Background}"
478 Width="{TemplateBinding Width}"
479 Height="{TemplateBinding Height}"/>
480 </ControlTemplate>
481 </Setter.Value>
482 </Setter>
483 </Style>
484 <Style x:Key="VerticalScrollBarPageButton"
485 TargetType="{x:Type RepeatButton}">
486 <Setter Property="OverridesDefaultStyle"
487 Value="true"/>
488 <Setter Property="Background"
489 Value="Transparent"/>
490 <Setter Property="Focusable"
491 Value="false"/>
492 <Setter Property="IsTabStop"
493 Value="false"/>
494 <Setter Property="Opacity"
495 Value="0"/>
496 <Setter Property="Template">
497 <Setter.Value>
498 <ControlTemplate TargetType="{x:Type RepeatButton}">
499 <Rectangle Fill="{TemplateBinding Background}"
500 Width="{TemplateBinding Width}"
501 Height="{TemplateBinding Height}"/>
502 </ControlTemplate>
503 </Setter.Value>
504 </Setter>
505 </Style>
506 <Style
507 TargetType="{x:Type ScrollBar}">
508 <Setter Property="OverridesDefaultStyle"
509 Value="True" />
510 <Setter Property="Stylus.IsPressAndHoldEnabled"
511 Value="false"/>
512 <Setter Property="Stylus.IsFlicksEnabled"
513 Value="false"/>
514 <Setter Property="Background"
515 Value="Transparent"/>
516 <Setter Property="Margin"
517 Value="0,0,0,0"/>
518 <Setter Property="Width"
519 Value="8"/>
520 <Setter Property="MinWidth"
521 Value="2"/>
522 <Setter Property="Opacity"
523 Value="1"/>
524 <Setter Property="Template">
525 <Setter.Value>
526 <ControlTemplate TargetType="{x:Type ScrollBar}">
527 <Grid x:Name="Bg" SnapsToDevicePixels="true">
528 <Track x:Name="PART_Track"
529 IsEnabled="{TemplateBinding IsMouseOver}"
530 IsDirectionReversed="true">
531 <Track.DecreaseRepeatButton>
532 <RepeatButton
533 Style="{StaticResource VerticalScrollBarPageButton}"
534 Command="{x:Static ScrollBar.PageUpCommand}"/>
535 </Track.DecreaseRepeatButton>
536 <Track.IncreaseRepeatButton>
537 <RepeatButton
538 Style="{StaticResource VerticalScrollBarPageButton}"
539 Command="{x:Static ScrollBar.PageDownCommand}"/>
540 </Track.IncreaseRepeatButton>
541 <Track.Thumb>
542 <Thumb Style="{StaticResource ScrollBarThumb}"/>
543 </Track.Thumb>
544 </Track>
545 </Grid>
546 </ControlTemplate>
547 </Setter.Value>
548 </Setter>
549 <Style.Triggers>
550 <Trigger Property="Orientation"
551 Value="Horizontal">
552 <Setter Property="Background"
553 Value="Transparent"/>
554 <Setter Property="Margin"
555 Value="1,0,6,1"/>
556 <Setter Property="Height"
557 Value="5"/>
558 <Setter Property="MinHeight"
559 Value="5"/>
560 <Setter Property="Width"
561 Value="Auto"/>
562 <Setter Property="Opacity"
563 Value="0"/>
564 <Setter Property="Template">
565 <Setter.Value>
566 <ControlTemplate TargetType="{x:Type ScrollBar}">
567 <Grid x:Name="Bg" SnapsToDevicePixels="true">
568 <Track x:Name="PART_Track"
569 IsEnabled="{TemplateBinding IsMouseOver}">
570 <Track.DecreaseRepeatButton>
571 <RepeatButton Style="{StaticResource HorizontalScrollBarPageButton}"
572 Command="{x:Static ScrollBar.PageLeftCommand}"/>
573 </Track.DecreaseRepeatButton>
574 <Track.IncreaseRepeatButton>
575 <RepeatButton Style="{StaticResource HorizontalScrollBarPageButton}"
576 Command="{x:Static ScrollBar.PageRightCommand}"/>
577 </Track.IncreaseRepeatButton>
578 <Track.Thumb>
579 <Thumb Style="{StaticResource ScrollBarThumb}"/>
580 </Track.Thumb>
581 </Track>
582 </Grid>
583 </ControlTemplate>
584 </Setter.Value>
585 </Setter>
586 </Trigger>
587 </Style.Triggers>
588 </Style>
589 <!-- ScrollViewer -->
590 <Style
591 TargetType="{x:Type ScrollViewer}">
592 <Setter Property="Background" Value="Transparent"/>
593 <Setter Property="OverridesDefaultStyle"
594 Value="True" />
595 <Setter Property="Template">
596 <Setter.Value>
597 <ControlTemplate TargetType="{x:Type ScrollViewer}">
598 <Border BorderBrush="{TemplateBinding BorderBrush}"
599 BorderThickness="{TemplateBinding BorderThickness}"
600 Padding="{TemplateBinding Padding}"
601 >
602 <Grid Background="{TemplateBinding Background}">
603 <!--ScrollViewer左侧内容模版,对它没什么特别的操作,默认就可以-->
604 <!--<ScrollContentPresenter x:Name="PART_ScrollContentPresenter"
605 CanContentScroll="{TemplateBinding CanContentScroll}"
606 CanHorizontallyScroll="False"
607 CanVerticallyScroll="True"
608 ContentTemplate="{TemplateBinding ContentTemplate}"
609 Content="{TemplateBinding Content}"
610 Grid.Column="0"
611 Margin="{TemplateBinding Padding}"
612 Grid.Row="0" />-->
613
614 <ScrollContentPresenter
615 CanContentScroll="{TemplateBinding CanContentScroll}"
616 Cursor="{TemplateBinding Cursor}"
617 Margin="{TemplateBinding Padding}"
618 Content="{TemplateBinding Content}"
619 ContentTemplate="{TemplateBinding ContentTemplate}"/>
620 <ScrollBar x:Name="PART_VerticalScrollBar"
621 HorizontalAlignment="Right"
622 Margin="0,0,3,0"
623 Maximum="{TemplateBinding ScrollableHeight}"
624 Opacity="0"
625 Width="2"
626 Orientation="Vertical"
627 ScrollViewer.IsDeferredScrollingEnabled="True"
628 ViewportSize="{TemplateBinding ViewportHeight}"
629 Value="{TemplateBinding VerticalOffset}"
630 Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}" />
631 <ScrollBar x:Name="PART_HorizontalScrollBar"
632 Maximum="{TemplateBinding ScrollableWidth}"
633 Orientation="Horizontal"
634 ScrollViewer.IsDeferredScrollingEnabled="True"
635 VerticalAlignment="Bottom"
636 Value="{TemplateBinding HorizontalOffset}"
637 ViewportSize="{TemplateBinding ViewportWidth}"
638 Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}"/>
639 </Grid>
640 </Border>
641 <ControlTemplate.Triggers>
642 <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=IsMouseOver}" Value="True">
643 <DataTrigger.EnterActions>
644 <BeginStoryboard>
645 <Storyboard>
646 <DoubleAnimation
647 Storyboard.TargetName="PART_VerticalScrollBar"
648 Storyboard.TargetProperty="Opacity"
649 To="1"
650 Duration="0:0:0.3"/>
651 </Storyboard>
652 </BeginStoryboard>
653 </DataTrigger.EnterActions>
654 <DataTrigger.ExitActions>
655 <BeginStoryboard>
656 <Storyboard>
657 <DoubleAnimation
658 Storyboard.TargetName="PART_VerticalScrollBar"
659 Storyboard.TargetProperty="Opacity"
660 To="0"
661 Duration="0:0:0.3"/>
662 </Storyboard>
663 </BeginStoryboard>
664 </DataTrigger.ExitActions>
665 </DataTrigger>
666 <!--<Trigger Property="IsMouseOver" Value="True">
667 <Setter TargetName="PART_VerticalScrollBar" Property="Opacity" Value="1" />
668
669 </Trigger>
670 <Trigger Property="IsMouseOver" Value="False">
671 <Setter TargetName="PART_VerticalScrollBar" Property="Opacity" Value="0" />
672
673 </Trigger>-->
674 <EventTrigger RoutedEvent="MouseEnter"
675 SourceName="PART_VerticalScrollBar">
676 <BeginStoryboard>
677 <Storyboard>
678
679 <DoubleAnimation
680 Storyboard.TargetName="PART_VerticalScrollBar"
681 Storyboard.TargetProperty="Width"
682 To="8"
683 Duration="0:0:0.1"/>
684 </Storyboard>
685 </BeginStoryboard>
686 </EventTrigger>
687 <EventTrigger RoutedEvent="MouseLeave"
688 SourceName="PART_VerticalScrollBar">
689 <BeginStoryboard>
690 <Storyboard>
691 <DoubleAnimation
692 Storyboard.TargetName="PART_VerticalScrollBar"
693 Storyboard.TargetProperty="Width"
694 To="2"
695 Duration="0:0:0.1"/>
696 </Storyboard>
697 </BeginStoryboard>
698 </EventTrigger>
699 </ControlTemplate.Triggers>
700
701 </ControlTemplate>
702 </Setter.Value>
703 </Setter>
704 </Style>
705
706</ResourceDictionary>