This repository has been archived by the owner on Jul 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAddTimerModal.xaml
85 lines (85 loc) · 4.81 KB
/
AddTimerModal.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
<UserControl x:Class="Timer.AddTimerModal"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Timer"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<Grid>
<Grid Name="Background" Background="DimGray" Opacity=".5" MouseDown="Background_OnMouseDown" ToolTip="Нажми, чтобы закрыть"/>
<Grid VerticalAlignment="Center" HorizontalAlignment="Center">
<Grid.Resources>
<Style TargetType="Button">
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Foreground" Value="WhiteSmoke"/>
<Setter Property="Padding" Value="10"/>
<Setter Property="Background">
<Setter.Value>
<SolidColorBrush Color="Black" Opacity=".2"/>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="TextBox">
<Setter Property="IsReadOnly" Value="True"/>
<Setter Property="Focusable" Value="False"/>
<Setter Property="FontSize" Value="60"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="Margin" Value="4"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Background">
<Setter.Value>
<SolidColorBrush Color="Black" Opacity=".2"/>
</Setter.Value>
</Setter>
<Setter Property="Foreground" Value="WhiteSmoke"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="TextBox">
<Border Background="{TemplateBinding Background}"
x:Name="Bd" BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="10">
<ScrollViewer x:Name="PART_ContentHost"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Grid.Resources>
<Border CornerRadius="20" Background="DimGray">
<Border.Effect>
<DropShadowEffect Direction="-90" BlurRadius="20" ShadowDepth="0" RenderingBias="Quality"/>
</Border.Effect>
</Border>
<Border Padding="10px" CornerRadius="20" >
<StackPanel>
<TextBlock Text="Добавить таймер" TextAlignment="Center" Foreground="WhiteSmoke" FontSize="20" Margin="0 0 0 10"/>
<TextBox Padding="4" FontSize="20" Name="Title" Text="" ToolTip="Название" TextAlignment="Center" IsReadOnly="False" MouseWheel="Title_OnMouseWheel" Focusable="True"/>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="100px"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="100px"/>
<ColumnDefinition Width="100px"/>
<ColumnDefinition Width="100px"/>
</Grid.ColumnDefinitions>
<TextBox Name="Hours" Text="00" MouseWheel="EventSetter_OnHandler" ToolTip="Часы"/>
<TextBox Name="Minutes" Text="00" Grid.Column="1" MouseWheel="EventSetter_OnHandler" ToolTip="Минуты"/>
<TextBox Name="Seconds" Text="00" Grid.Column="2" MouseWheel="EventSetter_OnHandler" ToolTip="Секунды"/>
<Button Content="Добавить" Grid.Row="1" Grid.Column="1" Margin="0 2" Click="ButtonBase_OnClick">
<Button.Resources>
<Style TargetType="{x:Type Border}">
<Setter Property="CornerRadius" Value="10"/>
<Setter Property="Padding" Value="10,2,10,3"/>
</Style>
</Button.Resources>
</Button>
</Grid>
</StackPanel>
</Border>
</Grid>
</Grid>
</UserControl>