123456789101112131415161718192021222324252627282930313233 |
- <Window x:Class="VideoprokatApp.AddEditWindow"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- Title="Добавить/Редактировать запись" Height="300" Width="400">
- <Window.Resources>
- <Style x:Key="WatermarkTextBox" TargetType="TextBox">
- <Setter Property="Foreground" Value="LightGray"/>
- <Setter Property="Text" Value="{Binding RelativeSource={RelativeSource Self}, Path=Tag}"/>
- <Style.Triggers>
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="Text" Value=""/>
- <Condition Property="IsFocused" Value="False"/>
- </MultiTrigger.Conditions>
- <Setter Property="Foreground" Value="LightGray"/>
- <Setter Property="Text" Value="{Binding RelativeSource={RelativeSource Self}, Path=Tag}"/>
- </MultiTrigger>
- <Trigger Property="IsFocused" Value="True">
- <Setter Property="Foreground" Value="Black"/>
- </Trigger>
- </Style.Triggers>
- </Style>
- </Window.Resources>
- <Grid>
- <StackPanel Margin="10">
- <TextBox x:Name="NomerKassetyTextBox" Text="{Binding NomerKassety}" Tag="Введите номер кассеты" Style="{StaticResource WatermarkTextBox}" />
- <TextBox x:Name="KodFilmaTextBox" Text="{Binding KlassifikatsionnyKod.NazvanieFilma}" Tag="Введите код фильма" Style="{StaticResource WatermarkTextBox}" />
- <CheckBox x:Name="PriznakNalichiyaCheckBox" IsChecked="{Binding PriznakNalichiya}" Content="Признак наличия" />
- <Button Content="Сохранить" Click="SaveButton_Click" Margin="0,10,0,0"/>
- <Button Content="Отмена" Click="CancelButton_Click" Margin="0,10,0,0"/>
- </StackPanel>
- </Grid>
- </Window>
|