-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNoteWindow.xaml
More file actions
66 lines (60 loc) · 2.74 KB
/
NoteWindow.xaml
File metadata and controls
66 lines (60 loc) · 2.74 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
<Window x:Class="GlassNotes.NoteWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="{Binding Title}"
Height="360" Width="420"
WindowStyle="None"
AllowsTransparency="True"
Background="Transparent"
ResizeMode="CanResize"
Topmost="True"
Icon="Assets/icon.ico"
SourceInitialized="Window_SourceInitialized">
<Border x:Name="OuterBorder"
Background="{DynamicResource NoteBackgroundBrush}"
BorderBrush="{DynamicResource BorderBrush}"
BorderThickness="1"
CornerRadius="16">
<Border.Effect>
<DropShadowEffect Color="#000000" BlurRadius="24" ShadowDepth="4" Opacity="0.18" Direction="270"/>
</Border.Effect>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<!-- Title Bar -->
<Border Grid.Row="0"
Background="{DynamicResource SurfaceBrush}"
CornerRadius="16,16,0,0"
MouseLeftButtonDown="TitleBar_MouseLeftButtonDown">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding Title}"
FontWeight="SemiBold" FontSize="13"
Foreground="{DynamicResource TextPrimaryBrush}"
VerticalAlignment="Center"
Margin="16,8"/>
<StackPanel Grid.Column="1" Orientation="Horizontal" Margin="4,4">
<Button Content="✕" Style="{StaticResource IconButton}"
Click="CloseButton_Click" ToolTip="Close" Width="32" Height="32"/>
</StackPanel>
</Grid>
</Border>
<!-- Note Content Area -->
<Grid Grid.Row="1" Margin="8" ClipToBounds="True">
<TextBox x:Name="NoteTextBox"
Text="{Binding Content, UpdateSourceTrigger=PropertyChanged}"
AcceptsReturn="True" TextWrapping="Wrap"
BorderThickness="0" Background="Transparent"
Foreground="{DynamicResource NoteForegroundBrush}"
FontSize="14"
VerticalScrollBarVisibility="Auto"
Padding="12"/>
</Grid>
</Grid>
</Border>
</Window>