1+ <Application x : Class =" DemoApp.App"
2+ xmlns =" http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3+ xmlns : x =" http://schemas.microsoft.com/winfx/2006/xaml"
4+ xmlns : System =" clr-namespace:System;assembly=mscorlib"
5+ xmlns : local =" clr-namespace:DemoApp"
6+ xmlns : CommonControls =" clr-namespace:TensorStack.WPF.Controls;assembly=TensorStack.WPF"
7+ xmlns : Extractors =" clr-namespace:TensorStack.Extractors.Common;assembly=TensorStack.Extractors"
8+ xmlns : TextGeneration =" clr-namespace:TensorStack.TextGeneration.Common;assembly=TensorStack.TextGeneration"
9+ xmlns : StableDiffusion =" clr-namespace:TensorStack.StableDiffusion.Enums;assembly=TensorStack.StableDiffusion"
10+ ShutdownMode =" OnMainWindowClose" >
11+ <Application .Resources>
12+
13+
14+ <ResourceDictionary >
15+
16+ <!-- DemoApp-->
17+ <BitmapImage x : Key =" BackgroundGradient" UriSource =" pack://application:,,,/DemoApp;component/Images/Background.jpeg" />
18+
19+ <ObjectDataProvider x : Key =" EarlyStopping" MethodName =" GetValues" ObjectType =" {x:Type System:Enum}" >
20+ <ObjectDataProvider .MethodParameters>
21+ <x : Type TypeName =" TextGeneration:EarlyStopping" />
22+ </ObjectDataProvider .MethodParameters>
23+ </ObjectDataProvider >
24+
25+ <ObjectDataProvider x : Key =" BackgroundMode" MethodName =" GetValues" ObjectType =" {x:Type System:Enum}" >
26+ <ObjectDataProvider .MethodParameters>
27+ <x : Type TypeName =" Extractors:BackgroundMode" />
28+ </ObjectDataProvider .MethodParameters>
29+ </ObjectDataProvider >
30+
31+
32+ <ObjectDataProvider x : Key =" SchedulerType" MethodName =" GetValues" ObjectType =" {x:Type System:Enum}" >
33+ <ObjectDataProvider .MethodParameters>
34+ <x : Type TypeName =" StableDiffusion:SchedulerType" />
35+ </ObjectDataProvider .MethodParameters>
36+ </ObjectDataProvider >
37+
38+
39+ <Style x : Key =" BorderPanel" TargetType =" {x:Type Border}" >
40+ <Setter Property =" Padding" Value =" 4" />
41+ <Setter Property =" Background" Value =" #15000000" />
42+ <Setter Property =" BorderBrush" Value =" {StaticResource ControlDarkerBorderBrush}" />
43+ <Setter Property =" BorderThickness" Value =" 1" />
44+ <Setter Property =" CornerRadius" Value =" 0" />
45+ </Style >
46+
47+
48+ <Style x : Key =" ImageDropZoneStyle" TargetType =" {x:Type Border}" >
49+ <Setter Property =" AllowDrop" Value =" False" />
50+ <Setter Property =" BorderBrush" Value =" Transparent" />
51+ <Setter Property =" BorderThickness" Value =" 1" />
52+ <Style .Triggers>
53+ <MultiDataTrigger >
54+ <MultiDataTrigger .Conditions>
55+ <Condition Binding =" {Binding IsDragDrop, RelativeSource={RelativeSource AncestorType=CommonControls:ViewControl}}" Value =" True" />
56+ <Condition Binding =" {Binding DragDropType, RelativeSource={RelativeSource AncestorType=CommonControls:ViewControl}}" Value =" Image" />
57+ </MultiDataTrigger .Conditions>
58+ <MultiDataTrigger .Setters>
59+ <Setter Property =" AllowDrop" Value =" True" />
60+ <Setter Property =" BorderBrush" Value =" {StaticResource AccentColour2}" />
61+ </MultiDataTrigger .Setters>
62+ </MultiDataTrigger >
63+ </Style .Triggers>
64+ </Style >
65+
66+
67+ <Style x : Key =" VideoDropZoneStyle" TargetType =" {x:Type Border}" >
68+ <Setter Property =" AllowDrop" Value =" False" />
69+ <Setter Property =" BorderBrush" Value =" Transparent" />
70+ <Setter Property =" BorderThickness" Value =" 1" />
71+ <Style .Triggers>
72+ <MultiDataTrigger >
73+ <MultiDataTrigger .Conditions>
74+ <Condition Binding =" {Binding IsDragDrop, RelativeSource={RelativeSource AncestorType=CommonControls:ViewControl}}" Value =" True" />
75+ <Condition Binding =" {Binding DragDropType, RelativeSource={RelativeSource AncestorType=CommonControls:ViewControl}}" Value =" Video" />
76+ </MultiDataTrigger .Conditions>
77+ <MultiDataTrigger .Setters>
78+ <Setter Property =" AllowDrop" Value =" True" />
79+ <Setter Property =" BorderBrush" Value =" {StaticResource AccentColour2}" />
80+ </MultiDataTrigger .Setters>
81+ </MultiDataTrigger >
82+ </Style .Triggers>
83+ </Style >
84+
85+
86+
87+
88+
89+ <Style x : Key =" ToggleButtonBasic" TargetType =" {x:Type ToggleButton}" >
90+ <Setter Property =" FocusVisualStyle" Value =" {StaticResource FocusVisual}" />
91+ <Setter Property =" Background" Value =" {StaticResource ComboBoxBackground}" />
92+ <Setter Property =" BorderBrush" Value =" {StaticResource ComboBoxBorder}" />
93+ <Setter Property =" Foreground" Value =" {StaticResource ButtonForeground}" />
94+ <Setter Property =" BorderThickness" Value =" 0" />
95+ <Setter Property =" HorizontalContentAlignment" Value =" Center" />
96+ <Setter Property =" VerticalContentAlignment" Value =" Center" />
97+ <Setter Property =" Padding" Value =" 1" />
98+ <Setter Property =" Template" >
99+ <Setter .Value>
100+ <ControlTemplate TargetType =" {x:Type ToggleButton}" >
101+ <Border x : Name =" border" Background =" {TemplateBinding Background}" BorderBrush =" {TemplateBinding BorderBrush}" BorderThickness =" 1" SnapsToDevicePixels =" true" >
102+ <ContentPresenter x : Name =" contentPresenter" Opacity =" 0.7" Focusable =" False" HorizontalAlignment =" {TemplateBinding HorizontalContentAlignment}" Margin =" {TemplateBinding Padding}" RecognizesAccessKey =" True" SnapsToDevicePixels =" {TemplateBinding SnapsToDevicePixels}" VerticalAlignment =" {TemplateBinding VerticalContentAlignment}" />
103+ </Border >
104+ <ControlTemplate .Triggers>
105+ <Trigger Property =" Button.IsDefaulted" Value =" true" >
106+ <Setter Property =" BorderBrush" TargetName =" border" Value =" {StaticResource ButtonBorderDefault}" />
107+ </Trigger >
108+ <Trigger Property =" IsMouseOver" Value =" true" >
109+ <Setter Property =" BorderBrush" TargetName =" border" Value =" {StaticResource ButtonBorderMouseOver}" />
110+ <Setter Property =" ContentPresenter.Opacity" TargetName =" contentPresenter" Value =" 1" />
111+ </Trigger >
112+
113+ <Trigger Property =" IsEnabled" Value =" false" >
114+ <Setter Property =" Opacity" Value =" 0.3" />
115+ <Setter Property =" BorderBrush" TargetName =" border" Value =" {StaticResource ButtonBorderDisabled}" />
116+ <Setter Property =" TextElement.Foreground" TargetName =" contentPresenter" Value =" {StaticResource ButtonForegroundDisabled}" />
117+ </Trigger >
118+ <Trigger Property =" IsChecked" Value =" false" >
119+ <Setter Property =" ContentPresenter.Opacity" TargetName =" contentPresenter" Value =" 1" />
120+ </Trigger >
121+ </ControlTemplate .Triggers>
122+ </ControlTemplate >
123+ </Setter .Value>
124+ </Setter >
125+ </Style >
126+
127+
128+
129+
130+
131+
132+
133+
134+
135+
136+
137+
138+ <!-- TensorStack.WPF-->
139+ <ResourceDictionary .MergedDictionaries>
140+ <ResourceDictionary Source =" pack://application:,,,/TensorStack.WPF;component/ThemeDefault.xaml" />
141+ </ResourceDictionary .MergedDictionaries>
142+
143+ </ResourceDictionary >
144+
145+
146+ </Application .Resources>
147+ </Application >
0 commit comments