123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181 |
- <Page x:Class="teaTime.wEventAdd"
- 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:teaTime"
- mc:Ignorable="d"
- d:DesignHeight="450" d:DesignWidth="800"
- Title="wEventAdd" Background="#D3DB94">
- <Page.Resources>
- <Style x:Key="FocusVisual">
- <Setter Property="Control.Template">
- <Setter.Value>
- <ControlTemplate>
- <Rectangle Margin="2" SnapsToDevicePixels="true" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" StrokeThickness="1" StrokeDashArray="1 2"/>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <SolidColorBrush x:Key="Button.Static.Background" Color="#E8ECC8"/>
- <SolidColorBrush x:Key="Button.Static.Border" Color="#E8ECC8"/>
- <SolidColorBrush x:Key="Button.MouseOver.Background" Color="#E8ECC8"/>
- <SolidColorBrush x:Key="Button.MouseOver.Border" Color="#E8ECC8"/>
- <SolidColorBrush x:Key="Button.Pressed.Background" Color="#E8ECC8"/>
- <SolidColorBrush x:Key="Button.Pressed.Border" Color="#E8ECC8"/>
- <SolidColorBrush x:Key="Button.Disabled.Background" Color="#E8ECC8"/>
- <SolidColorBrush x:Key="Button.Disabled.Border" Color="#E8ECC8"/>
- <SolidColorBrush x:Key="Button.Disabled.Foreground" Color="#E8ECC8"/>
- <Style x:Key="RoundedButtonStyle" TargetType="{x:Type Button}">
- <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
- <Setter Property="Background" Value="{StaticResource Button.Static.Background}"/>
- <Setter Property="BorderBrush" Value="{StaticResource Button.Static.Border}"/>
- <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
- <Setter Property="BorderThickness" Value="0"/>
- <Setter Property="HorizontalContentAlignment" Value="Center"/>
- <Setter Property="VerticalContentAlignment" Value="Center"/>
- <Setter Property="Padding" Value="1"/>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type Button}">
- <Border x:Name="border" CornerRadius="10" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
- <ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsDefaulted" Value="true">
- <Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
- </Trigger>
- <Trigger Property="IsMouseOver" Value="true">
- <Setter Property="Background" TargetName="border" Value="#E8ECC8"/>
- <Setter Property="BorderBrush" TargetName="border" Value="#E8ECC8"/>
- </Trigger>
- <Trigger Property="IsPressed" Value="true">
- <Setter Property="Background" TargetName="border" Value="#E8ECC8"/>
- <Setter Property="BorderBrush" TargetName="border" Value="#E8ECC8"/>
- </Trigger>
- <Trigger Property="IsEnabled" Value="false">
- <Setter Property="Background" TargetName="border" Value="{StaticResource Button.Disabled.Background}"/>
- <Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Disabled.Border}"/>
- <Setter Property="TextElement.Foreground" TargetName="contentPresenter" Value="{StaticResource Button.Disabled.Foreground}"/>
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style x:Key="RoundedButtonStyle2" TargetType="{x:Type Button}">
- <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
- <Setter Property="Background" Value="{StaticResource Button.Static.Background}"/>
- <Setter Property="BorderBrush" Value="{StaticResource Button.Static.Border}"/>
- <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
- <Setter Property="BorderThickness" Value="0"/>
- <Setter Property="HorizontalContentAlignment" Value="Center"/>
- <Setter Property="VerticalContentAlignment" Value="Center"/>
- <Setter Property="Padding" Value="1"/>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type Button}">
- <Border x:Name="border" CornerRadius="90" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
- <ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsDefaulted" Value="true">
- <Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
- </Trigger>
- <Trigger Property="IsMouseOver" Value="true">
- <Setter Property="Background" TargetName="border" Value="#E8ECC8"/>
- <Setter Property="BorderBrush" TargetName="border" Value="#E8ECC8"/>
- </Trigger>
- <Trigger Property="IsPressed" Value="true">
- <Setter Property="Background" TargetName="border" Value="#E8ECC8"/>
- <Setter Property="BorderBrush" TargetName="border" Value="#E8ECC8"/>
- </Trigger>
- <Trigger Property="IsEnabled" Value="false">
- <Setter Property="Background" TargetName="border" Value="{StaticResource Button.Disabled.Background}"/>
- <Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Disabled.Border}"/>
- <Setter Property="TextElement.Foreground" TargetName="contentPresenter" Value="{StaticResource Button.Disabled.Foreground}"/>
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style x:Key="SimpleListBoxItem" TargetType="ListBoxItem">
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="ListBoxItem">
- <Border Name="Border" Padding="2" SnapsToDevicePixels="true">
- <ContentPresenter/>
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="true">
- <Setter TargetName="Border" Property="Background" Value="white"/>
- <Setter TargetName="Border" Property="BorderBrush" Value="#D3DB94"/>
- <Setter TargetName="Border" Property="BorderThickness" Value="2"/>
- </Trigger>
- <Trigger Property="IsSelected" Value="True">
- <Setter TargetName="Border" Property="Background" Value="{StaticResource Button.Static.Border}"/>
- <Setter TargetName="Border" Property="BorderBrush" Value="#D3DB94"/>
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- </Page.Resources>
- <Viewbox Stretch="Uniform" Grid.RowSpan="2">
- <Border Width="800" Height="450">
- <Grid>
- <TextBlock Text="Добавить мероприятие" FontFamily="{StaticResource GogoiaDeco}" FontSize="35" HorizontalAlignment="Left" Foreground="#A77748" Margin="45 15 0 0"/>
- <Rectangle Fill="#FAEDCD" RadiusX="20" RadiusY="20" Height="350" Width="700" Margin="0,73,0,27"/>
- <Button x:Name="bClose" Width="35" Height="35" Margin="0 15 50 0" Click="bClose_Click" HorizontalAlignment="Right" VerticalAlignment="Top" Background="#FAEDCD" BorderThickness="0" Style="{DynamicResource RoundedButtonStyle2}">
- <Button.Content>
- <Grid>
- <Line X1="3" Y1="3" X2="20" Y2="20" Stroke="#D3DB94" StrokeDashArray="0.01" StrokeDashCap="Round" StrokeThickness="5"/>
- <Line X1="3" Y1="20" X2="20" Y2="3" Stroke="#D3DB94" StrokeDashArray="0.01" StrokeDashCap="Round" StrokeThickness="5" />
- </Grid>
- </Button.Content>
- </Button>
- <Button x:Name="bwrite" Width="140" Height="45" Margin="0,10,120,0" HorizontalAlignment="Right" VerticalAlignment="Top" VerticalContentAlignment="Center" Click="bwrite_Click" FontSize="25" FontFamily="{StaticResource GogoiaDeco}" Content="Создать" Foreground="#A77748" Background="#FAEDCD" Style="{DynamicResource RoundedButtonStyle}"/>
- <Grid Height="350" Width="750" Margin="0,73,0,27">
- <Grid>
- <TextBlock Text="Дата" FontFamily="{StaticResource GogoiaDeco}" FontWeight="Bold" FontSize="20" Foreground="#A77748" HorizontalAlignment="Left" Margin="55,25,0,0" VerticalAlignment="Top" RenderTransformOrigin="0.561,0.943" />
- <TextBlock Text="Время" FontFamily="{StaticResource GogoiaDeco}" FontWeight="Bold" FontSize="20" Foreground="#A77748" HorizontalAlignment="Left" Margin="220,25,0,0" VerticalAlignment="Top" />
- <DatePicker x:Name="dp" Width="120" Height="45" FontSize="13" SelectedDateFormat="Short" Margin="90,23,0,0" VerticalAlignment="Top" HorizontalAlignment="Left" Background="#FAEDCD" Foreground="#A77748" FontFamily="{StaticResource UniNeue-Regular}" BorderThickness="0" SelectedDateChanged="DatePicker_SelectedDateChanged" Initialized="DatePicker_Initialized"/>
- <Grid Width="125" Height="20" Margin="265 25 0 0" HorizontalAlignment="Left" VerticalAlignment="Top">
- <StackPanel Orientation="Horizontal">
- <TextBox x:Name="aTime" FontSize="13" IsReadOnly ="False" Text="Выбор времени" Width="95" BorderThickness="0" Foreground="#A77748" FontFamily="{StaticResource UniNeue-Regular}" HorizontalContentAlignment="Stretch" />
- <ComboBox x:Name="nHour" Width="15" HorizontalAlignment="Left" Background="White" FontFamily="{StaticResource UniNeue-Regular}" IsEditable="True" BorderThickness="0" ToolTip="часы" SelectionChanged="nHour_SelectionChanged" Initialized="nHour_Initialized">
- </ComboBox>
- <ComboBox x:Name="nMin" Width="15" HorizontalAlignment="Left" Background="White" FontFamily="{StaticResource UniNeue-Regular}" IsEditable="True" BorderThickness="0" ToolTip="Минуты" SelectionChanged="nMin_SelectionChanged" Initialized="nMin_Initialized">
- </ComboBox>
- </StackPanel>
- </Grid>
- <TextBlock Text="Название" FontFamily="{StaticResource GogoiaDeco}" FontWeight="Bold" FontSize="20" Foreground="#A77748" HorizontalAlignment="Left" Margin="55,59,0,0" VerticalAlignment="Top" />
- <TextBox x:Name="aName" Text="" FontSize="10" HorizontalAlignment="Left" Margin="128,59,0,248" Foreground="#A77748" Width="262" TextWrapping="Wrap" Background="White" FontFamily="{StaticResource UniNeue-Regular}" BorderThickness="0"/>
- <TextBlock Text="Тема" FontFamily="{StaticResource GogoiaDeco}" FontWeight="Bold" FontSize="20" Foreground="#A77748" HorizontalAlignment="Left" Margin="55,111,0,0" VerticalAlignment="Top" />
- <TextBox x:Name="aTheme" Text="" FontSize="10" HorizontalAlignment="Left" Margin="128,111,0,196" Foreground="#A77748" Width="262" TextWrapping="Wrap" Background="White" FontFamily="{StaticResource UniNeue-Regular}" BorderThickness="0"/>
- <TextBlock Text="Описание:" FontFamily="{StaticResource GogoiaDeco}" FontWeight="Bold" FontSize="20" HorizontalAlignment="Left" Margin="55,165,0,-65" Foreground="#A77748"/>
- <TextBox x:Name="aDescript" Text="" FontSize="10" HorizontalAlignment="Left" Margin="128,165,0,21" Foreground="#A77748" Width="262" TextWrapping="Wrap" Background="White" FontFamily="{StaticResource UniNeue-Regular}" BorderThickness="0"/>
- </Grid>
- <TextBlock Text="чайная Программа:" FontFamily="{StaticResource GogoiaDeco}" FontWeight="Bold" FontSize="20" HorizontalAlignment="Left" Margin="423,25,0,85" Foreground="#A77748"/>
- <Grid Width="270" Height="270" Margin="370 35 0 0">
- <ListBox x:Name="nameTea" BorderThickness="0" SelectionChanged="nameTea_SelectionChanged" ItemContainerStyle="{DynamicResource SimpleListBoxItem}">
- <ListBox.ItemTemplate>
- <DataTemplate>
- <StackPanel Orientation="Horizontal">
- <TextBlock Text="{Binding num , Mode=TwoWay}" FontFamily="{StaticResource UniNeue-Regular}" Foreground="#A77748" FontSize="10" Width="50"/>
- <ComboBox ItemsSource="{Binding value}" Width="200" Background="White" Foreground="#A77748" HorizontalContentAlignment="Stretch" FontSize="10" SelectedValue="{Binding endTea}" FontFamily="{StaticResource UniNeue-Regular}" IsEditable="True" ToolTip="Чай"/>
- </StackPanel>
- </DataTemplate>
- </ListBox.ItemTemplate>
- </ListBox>
- </Grid>
- </Grid>
- </Grid>
- </Border>
- </Viewbox>
- </Page>
|