|
1 | | -<Window x:Class="CutCode.NotificationDialogView" |
| 1 | +<UserControl x:Class="CutCode.NotificationDialogView" |
2 | 2 | xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
3 | 3 | xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
4 | 4 | xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
5 | 5 | xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
| 6 | + xmlns:s="https://github.com/canton7/Stylet" |
6 | 7 | xmlns:local="clr-namespace:CutCode" |
7 | | - mc:Ignorable="d" |
| 8 | + mc:Ignorable="d" |
8 | 9 | d:DataContext="{d:DesignInstance local:NotificationDialogViewModel}" |
9 | | - ResizeMode="NoResize" |
10 | | - WindowStyle="SingleBorderWindow" |
11 | 10 | UseLayoutRounding="True" |
12 | | - Title="Notification" Height="50" Width="270"> |
| 11 | + Padding="10"> |
13 | 12 |
|
14 | | - <WindowChrome.WindowChrome> |
15 | | - <WindowChrome GlassFrameThickness="0" CornerRadius="15" CaptionHeight="0" ResizeBorderThickness="5"/> |
16 | | - </WindowChrome.WindowChrome> |
17 | | - |
18 | | - <Window.Resources> |
| 13 | + <UserControl.Resources> |
19 | 14 | <Style x:Key="ButtonStyle" TargetType="Button"> |
20 | 15 | <Setter Property="Template"> |
21 | 16 | <Setter.Value> |
|
39 | 34 | </Setter.Value> |
40 | 35 | </Setter> |
41 | 36 | </Style> |
42 | | - </Window.Resources> |
43 | | - |
44 | | - <Grid Background="{Binding background}"> |
45 | | - <Grid.ColumnDefinitions> |
46 | | - <ColumnDefinition Width="*"/> |
47 | | - <ColumnDefinition Width="40"/> |
48 | | - </Grid.ColumnDefinitions> |
| 37 | + </UserControl.Resources> |
| 38 | + |
| 39 | + <Border Background="{Binding background}" CornerRadius="8" |
| 40 | + Height="50" MinWidth="250"> |
| 41 | + <Grid> |
| 42 | + <Grid.ColumnDefinitions> |
| 43 | + <ColumnDefinition Width="*"/> |
| 44 | + <ColumnDefinition Width="40"/> |
| 45 | + </Grid.ColumnDefinitions> |
49 | 46 |
|
50 | | - <Grid Grid.Column="0"> |
51 | | - <Grid.RowDefinitions> |
52 | | - <RowDefinition Height="30"/> |
53 | | - <RowDefinition Height="Auto"/> |
54 | | - </Grid.RowDefinitions> |
55 | | - <Label Grid.Row="0" FontSize="10.5" FontFamily="{StaticResource poppins_semibold}" Content="Notification" Foreground="{Binding textColor}"/> |
56 | | - <Label Grid.Row="1" Foreground="{Binding textColor}" Content="{Binding message}" Margin="0,-12,0,0" |
| 47 | + <Grid Grid.Column="0"> |
| 48 | + <Grid.RowDefinitions> |
| 49 | + <RowDefinition Height="30"/> |
| 50 | + <RowDefinition Height="Auto"/> |
| 51 | + </Grid.RowDefinitions> |
| 52 | + <Label Grid.Row="0" FontSize="10.5" FontFamily="{StaticResource poppins_semibold}" Content="Notification" Foreground="{Binding textColor}"/> |
| 53 | + <Label Grid.Row="1" Foreground="{Binding textColor}" Content="{Binding message}" Margin="0,-12,0,0" |
57 | 54 | FontSize="14" FontFamily="{StaticResource poppins_semibold}"/> |
58 | | - </Grid> |
| 55 | + </Grid> |
59 | 56 |
|
60 | | - <Button Grid.Column="1" Background="Transparent" Style="{DynamicResource ButtonStyle}" |
61 | | - Click="exitBtnClick" BorderBrush="{Binding exitBtnHoverColor}" VerticalAlignment="Center"> |
62 | | - <Image Width="20" Height="20" Margin="4,15,4,15" Source="{Binding exitImage}" |
| 57 | + <Button Margin="10,2,2,2" Grid.Column="1" Background="Transparent" |
| 58 | + Style="{DynamicResource ButtonStyle}" Command="{s:Action ExitCommand}" |
| 59 | + BorderBrush="{Binding exitBtnHoverColor}" VerticalAlignment="Center" Height="50"> |
| 60 | + <Image Width="18" Height="18" Source="{Binding exitImage}" |
63 | 61 | RenderOptions.BitmapScalingMode="HighQuality" RenderOptions.EdgeMode="Aliased"/> |
64 | | - </Button> |
| 62 | + </Button> |
65 | 63 |
|
66 | | - </Grid> |
67 | | -</Window> |
| 64 | + </Grid> |
| 65 | + </Border> |
| 66 | +</UserControl> |
0 commit comments