-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathApp.xaml
More file actions
123 lines (116 loc) · 7.17 KB
/
Copy pathApp.xaml
File metadata and controls
123 lines (116 loc) · 7.17 KB
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
<Application x:Class="SpawnDev.ILGPU.WpfDemo.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
StartupUri="MainWindow.xaml">
<Application.Resources>
<!-- Dark Theme Color Palette (matches Blazor demo) -->
<Color x:Key="BgDeep">#FF0F172A</Color>
<Color x:Key="BgMain">#FF1A1A2E</Color>
<Color x:Key="BgCard">#FF1E293B</Color>
<Color x:Key="BgCardHover">#FF334155</Color>
<Color x:Key="BorderSubtle">#FF2D3748</Color>
<Color x:Key="TextPrimary">#FFF1F5F9</Color>
<Color x:Key="TextSecondary">#FF94A3B8</Color>
<Color x:Key="TextMuted">#FF64748B</Color>
<Color x:Key="AccentBlue">#FF3B82F6</Color>
<Color x:Key="AccentPurple">#FF8B5CF6</Color>
<Color x:Key="AccentPink">#FFF472B6</Color>
<Color x:Key="AccentCyan">#FF00D4FF</Color>
<Color x:Key="SuccessGreen">#FF10B981</Color>
<SolidColorBrush x:Key="BgDeepBrush" Color="{StaticResource BgDeep}" />
<SolidColorBrush x:Key="BgMainBrush" Color="{StaticResource BgMain}" />
<SolidColorBrush x:Key="BgCardBrush" Color="{StaticResource BgCard}" />
<SolidColorBrush x:Key="BgCardHoverBrush" Color="{StaticResource BgCardHover}" />
<SolidColorBrush x:Key="BorderSubtleBrush" Color="{StaticResource BorderSubtle}" />
<SolidColorBrush x:Key="TextPrimaryBrush" Color="{StaticResource TextPrimary}" />
<SolidColorBrush x:Key="TextSecondaryBrush" Color="{StaticResource TextSecondary}" />
<SolidColorBrush x:Key="TextMutedBrush" Color="{StaticResource TextMuted}" />
<SolidColorBrush x:Key="AccentBlueBrush" Color="{StaticResource AccentBlue}" />
<SolidColorBrush x:Key="AccentPurpleBrush" Color="{StaticResource AccentPurple}" />
<SolidColorBrush x:Key="SuccessGreenBrush" Color="{StaticResource SuccessGreen}" />
<!-- Accent gradient for buttons -->
<LinearGradientBrush x:Key="AccentGradientBrush" StartPoint="0,0" EndPoint="1,1">
<GradientStop Color="{StaticResource AccentBlue}" Offset="0" />
<GradientStop Color="{StaticResource AccentPurple}" Offset="1" />
</LinearGradientBrush>
<LinearGradientBrush x:Key="HeroGradientBrush" StartPoint="0,0" EndPoint="1,1">
<GradientStop Color="{StaticResource AccentCyan}" Offset="0" />
<GradientStop Color="{StaticResource AccentPurple}" Offset="0.5" />
<GradientStop Color="{StaticResource AccentPink}" Offset="1" />
</LinearGradientBrush>
<!-- Default font -->
<Style TargetType="Window">
<Setter Property="FontFamily" Value="Segoe UI, Inter, sans-serif" />
</Style>
<!-- Dark ComboBox: full template override needed because WPF default
hardcodes a light ToggleButton background in the Aero theme -->
<ControlTemplate x:Key="DarkComboBoxToggleButton" TargetType="ToggleButton">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition Width="20" />
</Grid.ColumnDefinitions>
<Border x:Name="Border" Grid.ColumnSpan="2" CornerRadius="4"
Background="{StaticResource BgCardBrush}"
BorderBrush="{StaticResource BorderSubtleBrush}" BorderThickness="1" />
<Border Grid.Column="0" CornerRadius="4,0,0,4" Margin="1"
Background="Transparent" />
<Path x:Name="Arrow" Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center"
Data="M 0 0 L 4 4 L 8 0 Z" Fill="{StaticResource TextSecondaryBrush}" />
</Grid>
</ControlTemplate>
<Style TargetType="ComboBox">
<Setter Property="Foreground" Value="{StaticResource TextPrimaryBrush}" />
<Setter Property="Background" Value="{StaticResource BgCardBrush}" />
<Setter Property="Height" Value="30" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ComboBox">
<Grid>
<ToggleButton Name="ToggleButton"
Template="{StaticResource DarkComboBoxToggleButton}"
Focusable="False"
IsChecked="{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
ClickMode="Press" />
<ContentPresenter Name="ContentSite"
IsHitTestVisible="False"
Content="{TemplateBinding SelectionBoxItem}"
ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}"
Margin="8,3,24,3"
VerticalAlignment="Center"
HorizontalAlignment="Left" />
<Popup Name="Popup" Placement="Bottom"
IsOpen="{TemplateBinding IsDropDownOpen}"
AllowsTransparency="True" Focusable="False"
PopupAnimation="Slide">
<Grid Name="DropDown" SnapsToDevicePixels="True"
MinWidth="{TemplateBinding ActualWidth}"
MaxHeight="{TemplateBinding MaxDropDownHeight}">
<Border x:Name="DropDownBorder"
Background="{StaticResource BgCardBrush}"
BorderBrush="{StaticResource BorderSubtleBrush}"
BorderThickness="1" CornerRadius="4" />
<ScrollViewer Margin="4,6,4,6" SnapsToDevicePixels="True">
<StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Contained" />
</ScrollViewer>
</Grid>
</Popup>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- Dark-themed ComboBox dropdown items -->
<Style TargetType="ComboBoxItem">
<Setter Property="Background" Value="{StaticResource BgCardBrush}" />
<Setter Property="Foreground" Value="{StaticResource TextPrimaryBrush}" />
<Setter Property="Padding" Value="8,6" />
<Style.Triggers>
<Trigger Property="IsHighlighted" Value="True">
<Setter Property="Background" Value="{StaticResource BgCardHoverBrush}" />
</Trigger>
</Style.Triggers>
</Style>
</Application.Resources>
</Application>