-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMainWindow.xaml
More file actions
115 lines (107 loc) · 5.92 KB
/
MainWindow.xaml
File metadata and controls
115 lines (107 loc) · 5.92 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
<Window x:Class="SpawnDev.ILGPU.WpfDemo.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="SpawnDev.ILGPU — Desktop Demo"
Width="1400" Height="900"
MinWidth="900" MinHeight="600"
Background="{StaticResource BgDeepBrush}"
WindowStartupLocation="CenterScreen">
<!-- Resources MUST come before content that references them -->
<Window.Resources>
<!-- Navigation button style (radio button as nav item) -->
<Style x:Key="NavButtonStyle" TargetType="RadioButton">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="RadioButton">
<Border x:Name="Bd" Padding="16,10" Margin="6,2" CornerRadius="6"
Background="Transparent" Cursor="Hand">
<ContentPresenter />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="Bd" Property="Background" Value="#2A2A4A" />
</Trigger>
<Trigger Property="IsChecked" Value="True">
<Setter TargetName="Bd" Property="Background">
<Setter.Value>
<LinearGradientBrush StartPoint="0,0" EndPoint="1,0">
<GradientStop Color="#2B3B8B" Offset="0" />
<GradientStop Color="#3B2B7B" Offset="1" />
</LinearGradientBrush>
</Setter.Value>
</Setter>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="Foreground" Value="{StaticResource TextSecondaryBrush}" />
<Setter Property="FontSize" Value="13.5" />
<Setter Property="GroupName" Value="Nav" />
</Style>
<!-- Link-style button -->
<Style x:Key="NavLinkStyle" TargetType="Button">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border x:Name="Bd" Padding="16,8" Margin="6,1" CornerRadius="4"
Background="Transparent" Cursor="Hand">
<ContentPresenter />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="Bd" Property="Background" Value="#2A2A4A" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="Foreground" Value="{StaticResource TextMutedBrush}" />
<Setter Property="FontSize" Value="12.5" />
</Style>
</Window.Resources>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="220" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<!-- Sidebar Navigation -->
<Border Grid.Column="0" Background="{StaticResource BgMainBrush}"
BorderBrush="{StaticResource BorderSubtleBrush}" BorderThickness="0,0,1,0">
<DockPanel>
<!-- Brand header -->
<Border DockPanel.Dock="Top" Padding="16,14"
Background="#1E1E3A" BorderBrush="{StaticResource BorderSubtleBrush}" BorderThickness="0,0,0,1">
<TextBlock Text="SpawnDev.ILGPU" FontSize="16" FontWeight="Bold"
Foreground="{StaticResource TextPrimaryBrush}" />
</Border>
<!-- Footer links -->
<StackPanel DockPanel.Dock="Bottom" Margin="0,0,0,12">
<Separator Background="{StaticResource BorderSubtleBrush}" Margin="16,8" />
<Button Content="🔗 Project GitHub" Click="OnGitHubClick" Style="{StaticResource NavLinkStyle}" />
<Button Content="📖 ILGPU.net" Click="OnIlgpuNetClick" Style="{StaticResource NavLinkStyle}" />
</StackPanel>
<!-- Nav items -->
<StackPanel Margin="0,8,0,0">
<RadioButton x:Name="NavHome" Content="🏠 Home"
Style="{StaticResource NavButtonStyle}"
IsChecked="True" Checked="OnNavChanged" Tag="Home" />
<RadioButton x:Name="NavFractal" Content="🎨 Fractal Explorer"
Style="{StaticResource NavButtonStyle}"
Checked="OnNavChanged" Tag="Fractal" />
<RadioButton x:Name="NavRaymarch" Content="🌐 3D Explorer"
Style="{StaticResource NavButtonStyle}"
Checked="OnNavChanged" Tag="Raymarch" />
<RadioButton x:Name="NavBoids" Content="🐦 GPU Boids"
Style="{StaticResource NavButtonStyle}"
Checked="OnNavChanged" Tag="Boids" />
<RadioButton x:Name="NavBenchmarks" Content="⚡ Benchmarks"
Style="{StaticResource NavButtonStyle}"
Checked="OnNavChanged" Tag="Benchmarks" />
</StackPanel>
</DockPanel>
</Border>
<!-- Content area -->
<ContentControl x:Name="ContentArea" Grid.Column="1" />
</Grid>
</Window>