-
Notifications
You must be signed in to change notification settings - Fork 0
/
MessageYesNo.xaml
102 lines (98 loc) · 5.18 KB
/
MessageYesNo.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
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
<Window x:Class="WpfApp1.MessageYesNo"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:WpfApp1"
mc:Ignorable="d"
Title="پیغام" Height="200" Width="420" ResizeMode="NoResize" WindowStartupLocation="CenterScreen"
BorderThickness="1" BorderBrush="Black"
WindowStyle="None" Background="#FFE5E5E5" MouseDown="Grid_MouseDown" Topmost="True">
<Grid MouseDown="Grid_MouseDown">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition Height="60"/>
</Grid.RowDefinitions>
<StackPanel Grid.Row="0">
<Grid Margin="0,20,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition Width="105"/>
</Grid.ColumnDefinitions>
<Image Grid.Column="1" Source="/img/question.png" Width="64" HorizontalAlignment="Right" Margin="0,30,40,0"/>
<TextBlock x:Name="msgBoxText" Grid.Column="0"
FontSize="15" Foreground="#404040"
TextWrapping="Wrap"
Width="230"
HorizontalAlignment="Right"
VerticalAlignment="Center"
TextAlignment="Right"
FontFamily="fonts/#IRANSANS" Opacity="1"
FontWeight="SemiBold"
Margin="0,40,0,0" />
</Grid>
</StackPanel>
<StackPanel Grid.Row="1">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Button Content="بله" Foreground="#43a047"
FontSize="18" FontWeight="SemiBold" Grid.Column="1" Click="Button_Click" Margin="21.2,0,66.8,-0.2"
>
<Button.Style>
<Style TargetType="Button">
<Setter Property="TextElement.FontFamily"
Value="fonts/#IRANSANS"/>
<Setter Property="Background" Value="#eeeeee"/>
<Setter Property="Cursor" Value="Hand" />
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#e6e6e6" />
</Trigger>
</Style.Triggers>
</Style>
</Button.Style>
<Button.Template>
<ControlTemplate TargetType="Button">
<Border Width="120" Height="45"
CornerRadius="25" BorderThickness="1" BorderBrush="#737373"
Background="{TemplateBinding Background}">
<ContentPresenter VerticalAlignment="Center"
HorizontalAlignment="Center" />
</Border>
</ControlTemplate>
</Button.Template>
</Button>
<Button Content="خیر" Foreground="#d32f2f" Width="120"
FontSize="18" FontWeight="SemiBold" Grid.Column="0" Click="Button_Click_1" IsDefault="True" Margin="71,0,17.8,0"
>
<Button.Style>
<Style TargetType="Button">
<Setter Property="TextElement.FontFamily"
Value="fonts/#IRANSANS"/>
<Setter Property="Background" Value="#eeeeee"/>
<Setter Property="Cursor" Value="Hand" />
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#e6e6e6" />
</Trigger>
</Style.Triggers>
</Style>
</Button.Style>
<Button.Template>
<ControlTemplate TargetType="Button">
<Border Width="120" Height="45"
CornerRadius="25" BorderThickness="1" BorderBrush="#737373"
Background="{TemplateBinding Background}">
<ContentPresenter VerticalAlignment="Center"
HorizontalAlignment="Center" />
</Border>
</ControlTemplate>
</Button.Template>
</Button>
</Grid>
</StackPanel>
</Grid>
</Window>