-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMessageBoxCustom.xaml
35 lines (31 loc) · 1.85 KB
/
MessageBoxCustom.xaml
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
<!--Custom MessageBox for WPF applications developed by Blaze Devs & Shubhojeet Choudhury
This is a custom MessageBox that can be used in any WPF application-->
<Window x:Class="FilumDLWPF.MessageBoxCustom"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MessageBoxCustom" Height="250" Width="400" ResizeMode="NoResize"
WindowStartupLocation="CenterScreen">
<Window.Resources>
<Style x:Key="ButtonStyle" TargetType="Button">
<Setter Property="Background" Value="LightBlue"/>
<Setter Property="Foreground" Value="DarkBlue"/>
<Setter Property="FontWeight" Value="Bold"/>
<Setter Property="Width" Value="75"/>
<Setter Property="Height" Value="40"/>
<Setter Property="Margin" Value="10"/>
</Style>
</Window.Resources>
<Grid Background="GreenYellow">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TextBlock x:Name="MessageTextBlock" HorizontalAlignment="Center" VerticalAlignment="Center" TextWrapping="Wrap" Grid.Row="0" />
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Bottom" Grid.Row="1">
<Button x:Name="OkButton" Content="OK" Click="OkButton_Click" Style="{StaticResource ButtonStyle}"/>
<Button x:Name="CancelButton" Content="Cancel" Click="CancelButton_Click" Style="{StaticResource ButtonStyle}" />
<Button x:Name="ExtraButton" Content="Extra" Click="ExtraButton_Click" Visibility="Hidden" />
</StackPanel>
<Image Name="MsgIcon" HorizontalAlignment="Left" Height="42" Margin="341,0,0,0" VerticalAlignment="Top" Width="46"/>
</Grid>
</Window>