1 <Application x:Class="com.muldersoft.slunkcrypt.gui.App"
2 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4 StartupUri="SlunkCryptGUI.xaml">
6 <Application.Resources>
7 <Style TargetType="{x:Type FrameworkElement}" x:Key="DisableWhileBusy">
8 <Setter Property="IsEnabled" Value="true"/>
10 <DataTrigger Binding="{Binding IsBusy, RelativeSource={RelativeSource FindAncestor, AncestorType=Window}}" Value="true">
11 <Setter Property="IsEnabled" Value="false"/>
15 <Style TargetType="{x:Type FrameworkElement}" x:Key="EnableWhileBusy">
16 <Setter Property="IsEnabled" Value="false"/>
18 <DataTrigger Binding="{Binding IsBusy, RelativeSource={RelativeSource FindAncestor, AncestorType=Window}}" Value="true">
19 <Setter Property="IsEnabled" Value="true"/>
23 <Style TargetType="{x:Type FrameworkElement}" x:Key="HitInvisibleWhileBusy">
24 <Setter Property="IsEnabled" Value="true"/>
25 <EventSetter Event="PreviewDragEnter" Handler="FrameworkElement_PreviewUserInputEvent"/>
26 <EventSetter Event="PreviewDragOver" Handler="FrameworkElement_PreviewUserInputEvent"/>
27 <EventSetter Event="PreviewDrop" Handler="FrameworkElement_PreviewUserInputEvent"/>
28 <EventSetter Event="PreviewGotKeyboardFocus" Handler="FrameworkElement_PreviewUserInputEvent"/>
29 <EventSetter Event="PreviewKeyDown" Handler="FrameworkElement_PreviewUserInputEvent"/>
30 <EventSetter Event="PreviewKeyUp" Handler="FrameworkElement_PreviewUserInputEvent"/>
31 <EventSetter Event="PreviewMouseDown" Handler="FrameworkElement_PreviewUserInputEvent"/>
32 <EventSetter Event="PreviewMouseLeftButtonDown" Handler="FrameworkElement_PreviewUserInputEvent"/>
33 <EventSetter Event="PreviewMouseLeftButtonUp" Handler="FrameworkElement_PreviewUserInputEvent"/>
34 <EventSetter Event="PreviewMouseRightButtonDown" Handler="FrameworkElement_PreviewUserInputEvent"/>
35 <EventSetter Event="PreviewMouseRightButtonUp" Handler="FrameworkElement_PreviewUserInputEvent"/>
36 <EventSetter Event="PreviewMouseUp" Handler="FrameworkElement_PreviewUserInputEvent"/>
37 <EventSetter Event="PreviewMouseWheel" Handler="FrameworkElement_PreviewUserInputEvent"/>
38 <EventSetter Event="PreviewStylusButtonDown" Handler="FrameworkElement_PreviewUserInputEvent"/>
39 <EventSetter Event="PreviewStylusButtonUp" Handler="FrameworkElement_PreviewUserInputEvent"/>
40 <EventSetter Event="PreviewStylusDown" Handler="FrameworkElement_PreviewUserInputEvent"/>
41 <EventSetter Event="PreviewStylusInRange" Handler="FrameworkElement_PreviewUserInputEvent"/>
42 <EventSetter Event="PreviewStylusSystemGesture" Handler="FrameworkElement_PreviewUserInputEvent"/>
43 <EventSetter Event="PreviewStylusUp" Handler="FrameworkElement_PreviewUserInputEvent"/>
44 <EventSetter Event="PreviewTextInput" Handler="FrameworkElement_PreviewUserInputEvent"/>
45 <EventSetter Event="PreviewTouchDown" Handler="FrameworkElement_PreviewUserInputEvent"/>
46 <EventSetter Event="PreviewTouchUp" Handler="FrameworkElement_PreviewUserInputEvent"/>
48 <DataTrigger Binding="{Binding IsBusy, RelativeSource={RelativeSource FindAncestor, AncestorType=Window}}" Value="true">
49 <Setter Property="IsHitTestVisible" Value="false"/>
53 <Style TargetType="{x:Type FrameworkElement}" x:Key="WaitCursorWhileBusy">
55 <DataTrigger Binding="{Binding IsBusy, RelativeSource={RelativeSource FindAncestor, AncestorType=Window}}" Value="true">
56 <Setter Property="Cursor" Value="Wait"/>
57 <Setter Property="ForceCursor" Value="true"/>
61 <Style TargetType="{x:Type TextBlock}" x:Key="HighlightIfSelected">
63 <DataTrigger Binding="{Binding IsSelected, RelativeSource={RelativeSource FindAncestor, AncestorType=TabItem}}" Value="true">
64 <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.HotTrackBrushKey}}"/>
68 <Style TargetType="{x:Type Image}" x:Key="GrayOutIfDisabled">
69 <Setter Property="Opacity" Value="1.0"/>
71 <Trigger Property="IsEnabled" Value="False">
72 <Setter Property="Opacity" Value="0.5"/>
76 <Style TargetType="{x:Type FrameworkElement}" x:Key="HideIfNotEmpty">
77 <Setter Property="Visibility" Value="Collapsed"/>
79 <DataTrigger Binding="{Binding Count}" Value="0">
80 <Setter Property="Visibility" Value="Visible"/>
84 <Style TargetType="{x:Type ListViewItem}" x:Key="ItemToolTips">
85 <Setter Property="ToolTip">
87 <ToolTip Content="{Binding Chars}"/>
91 </Application.Resources>