-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMainWindow.xaml
More file actions
148 lines (139 loc) · 7.98 KB
/
MainWindow.xaml
File metadata and controls
148 lines (139 loc) · 7.98 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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
<?xml version="1.0" encoding="utf-8"?>
<Window
x:Class="NoteUI.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:animatedvisuals="using:Microsoft.UI.Xaml.Controls.AnimatedVisuals"
xmlns:crimson="using:Riverside.Toolkit.Controls"
Title="Notes">
<Grid x:Name="RootGrid" Background="Transparent">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<!-- Row 0: Custom title bar -->
<Grid x:Name="TitleBar" Grid.Row="0" Height="40" Padding="4,0">
<Grid x:Name="DragBar" Background="Transparent"
PointerPressed="DragBar_PointerPressed"
PointerMoved="DragBar_PointerMoved"
PointerReleased="DragBar_PointerReleased"/>
<Button x:Name="AddButton" HorizontalAlignment="Left" VerticalAlignment="Center"
Background="Transparent" BorderThickness="0"
Padding="10,6" Click="AddButton_Click"
PointerEntered="AnimatedButton_PointerEntered"
PointerExited="AnimatedButton_PointerExited">
<FontIcon Glyph="" FontSize="16"/>
</Button>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right"
VerticalAlignment="Center" Spacing="0">
<Button x:Name="SyncButton" Background="Transparent" BorderThickness="0"
Padding="10,6" Click="SyncButton_Click" Visibility="Collapsed"
PointerEntered="AnimatedButton_PointerEntered"
PointerExited="AnimatedButton_PointerExited">
<FontIcon x:Name="SyncIcon" Glyph="" FontSize="12"/>
</Button>
<Button x:Name="CompactButton" Background="Transparent" BorderThickness="0"
Padding="10,6" Click="Compact_Click"
PointerEntered="AnimatedButton_PointerEntered"
PointerExited="AnimatedButton_PointerExited">
<FontIcon x:Name="CompactIcon" Glyph="" FontSize="12"/>
</Button>
<Button x:Name="PinButton" Background="Transparent" BorderThickness="0"
Padding="10,6" Click="Pin_Click"
PointerEntered="AnimatedButton_PointerEntered"
PointerExited="AnimatedButton_PointerExited">
<FontIcon x:Name="PinIcon" Glyph="" FontSize="12"/>
</Button>
<Button x:Name="CloseButton" Background="Transparent" BorderThickness="0"
Padding="10,6" Click="Close_Click"
PointerEntered="AnimatedButton_PointerEntered"
PointerExited="AnimatedButton_PointerExited">
<FontIcon Glyph="" FontSize="12"/>
</Button>
</StackPanel>
</Grid>
<!-- Row 1: Title + accent glow line -->
<StackPanel x:Name="TitlePanel" Grid.Row="1" Margin="16,0,16,8" Spacing="4">
<StackPanel Orientation="Horizontal" Spacing="8">
<FontIcon x:Name="BackIcon" Glyph="" FontSize="16"
VerticalAlignment="Center" Visibility="Collapsed"
Tapped="BackIcon_Tapped"
Foreground="{ThemeResource TextFillColorSecondaryBrush}"/>
<TextBlock x:Name="TitleLabel" Text="Notes"
FontSize="22" FontWeight="Bold"
Tapped="TitleLabel_Tapped"/>
</StackPanel>
<crimson:GlowLine Width="340" Height="2" HorizontalAlignment="Left"/>
</StackPanel>
<!-- Row 2: Search -->
<Grid x:Name="SearchGrid" Grid.Row="2" Margin="12,0,12,8">
<TextBox x:Name="SearchBox"
TextChanged="SearchBox_TextChanged"
CornerRadius="4"
Padding="8,6,30,6">
<TextBox.Resources>
<StaticResource x:Key="TextControlBackground" ResourceKey="SubtleFillColorTransparentBrush"/>
<StaticResource x:Key="TextControlBackgroundPointerOver" ResourceKey="SubtleFillColorSecondaryBrush"/>
<StaticResource x:Key="TextControlBackgroundFocused" ResourceKey="SubtleFillColorSecondaryBrush"/>
<StaticResource x:Key="TextControlBorderBrush" ResourceKey="SubtleFillColorTransparentBrush"/>
<StaticResource x:Key="TextControlBorderBrushPointerOver" ResourceKey="ControlStrokeColorSecondaryBrush"/>
</TextBox.Resources>
</TextBox>
<FontIcon Glyph="" FontSize="14"
HorizontalAlignment="Right" VerticalAlignment="Center"
Margin="0,0,10,0" IsHitTestVisible="False"
Foreground="{ThemeResource TextFillColorTertiaryBrush}"/>
</Grid>
<!-- Update banner -->
<Button x:Name="UpdateBanner" Grid.Row="3" Visibility="Collapsed"
HorizontalAlignment="Stretch" HorizontalContentAlignment="Center"
Background="{ThemeResource AccentFillColorDefaultBrush}"
Foreground="{ThemeResource TextOnAccentFillColorPrimaryBrush}"
BorderThickness="0" CornerRadius="6" Margin="12,0,12,8"
Padding="8,6" MinHeight="0" FontSize="12"
Click="UpdateBanner_Click">
<StackPanel Orientation="Horizontal" Spacing="6">
<FontIcon Glyph="" FontSize="12"
Foreground="{ThemeResource TextOnAccentFillColorPrimaryBrush}"/>
<TextBlock x:Name="UpdateBannerText" Text="" VerticalAlignment="Center"
Foreground="{ThemeResource TextOnAccentFillColorPrimaryBrush}"/>
</StackPanel>
</Button>
<!-- Row 3: Notes list -->
<ScrollViewer x:Name="NotesScroll" Grid.Row="3" Padding="12,0,12,12"
VerticalScrollBarVisibility="Auto"
Background="Transparent" PointerPressed="NotesScroll_PointerPressed">
<StackPanel x:Name="NotesList" Spacing="8" Background="Transparent"/>
</ScrollViewer>
<!-- Row 4: Status bar -->
<Grid x:Name="StatusBar" Grid.Row="4" Padding="8,2,8,6">
<Button x:Name="QuickAccessButton"
HorizontalAlignment="Left" VerticalAlignment="Center"
Background="Transparent" BorderThickness="0"
Padding="8,5" CornerRadius="6"
Click="QuickAccessButton_Click"
PointerEntered="AnimatedButton_PointerEntered"
PointerExited="AnimatedButton_PointerExited">
<FontIcon Glyph="" FontSize="14"
Foreground="{ThemeResource TextFillColorSecondaryBrush}"/>
</Button>
<Button x:Name="SettingsButton" Background="Transparent" BorderThickness="0"
HorizontalAlignment="Right" VerticalAlignment="Center"
Padding="8,5" CornerRadius="6" Click="Settings_Click"
PointerEntered="SettingsButton_PointerEntered"
PointerExited="SettingsButton_PointerExited">
<AnimatedIcon x:Name="SettingsAnimatedIcon" Width="14" Height="14">
<AnimatedIcon.Source>
<animatedvisuals:AnimatedSettingsVisualSource/>
</AnimatedIcon.Source>
<AnimatedIcon.FallbackIconSource>
<FontIconSource Glyph=""/>
</AnimatedIcon.FallbackIconSource>
</AnimatedIcon>
</Button>
</Grid>
</Grid>
</Window>