|
| 1 | +<Window x:Class="CutCode.NotificationDialogView" |
| 2 | + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
| 3 | + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
| 4 | + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
| 5 | + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
| 6 | + xmlns:local="clr-namespace:CutCode" |
| 7 | + mc:Ignorable="d" |
| 8 | + d:DataContext="{d:DesignInstance local:NotificationDialogViewModel}" |
| 9 | + ResizeMode="NoResize" |
| 10 | + WindowStyle="SingleBorderWindow" |
| 11 | + UseLayoutRounding="True" |
| 12 | + Title="Notification" Height="50" Width="270"> |
| 13 | + |
| 14 | + <WindowChrome.WindowChrome> |
| 15 | + <WindowChrome GlassFrameThickness="0" CornerRadius="15" CaptionHeight="0" ResizeBorderThickness="5"/> |
| 16 | + </WindowChrome.WindowChrome> |
| 17 | + |
| 18 | + <Window.Resources> |
| 19 | + <Style x:Key="ButtonStyle" TargetType="Button"> |
| 20 | + <Setter Property="Template"> |
| 21 | + <Setter.Value> |
| 22 | + <ControlTemplate TargetType="Button"> |
| 23 | + <Border> |
| 24 | + <Border.Style> |
| 25 | + <Style TargetType="{x:Type Border}"> |
| 26 | + <Style.Triggers> |
| 27 | + <Trigger Property="IsMouseOver" Value="True"> |
| 28 | + <Setter Property="Background" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=BorderBrush}"/> |
| 29 | + <Setter Property="BorderBrush" Value="Transparent"/> |
| 30 | + </Trigger> |
| 31 | + </Style.Triggers> |
| 32 | + </Style> |
| 33 | + </Border.Style> |
| 34 | + <Grid Background="{TemplateBinding Background}"> |
| 35 | + <ContentPresenter></ContentPresenter> |
| 36 | + </Grid> |
| 37 | + </Border> |
| 38 | + </ControlTemplate> |
| 39 | + </Setter.Value> |
| 40 | + </Setter> |
| 41 | + </Style> |
| 42 | + </Window.Resources> |
| 43 | + |
| 44 | + <Grid Background="{Binding background}"> |
| 45 | + <Grid.ColumnDefinitions> |
| 46 | + <ColumnDefinition Width="*"/> |
| 47 | + <ColumnDefinition Width="40"/> |
| 48 | + </Grid.ColumnDefinitions> |
| 49 | + |
| 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" |
| 57 | + FontSize="14" FontFamily="{StaticResource poppins_semibold}"/> |
| 58 | + </Grid> |
| 59 | + |
| 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}" |
| 63 | + RenderOptions.BitmapScalingMode="HighQuality" RenderOptions.EdgeMode="Aliased"/> |
| 64 | + </Button> |
| 65 | + |
| 66 | + </Grid> |
| 67 | +</Window> |
0 commit comments