1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- <UserControl xmlns="https://github.com/avaloniaui"
- 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"
- x:DataType="vm:MainWindowViewModel"
- xmlns:vm="using:AvaloniaTeachersDB.ViewModels"
- mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="600"
- x:Class="AvaloniaTeachersDB.Views.AddTeacher">
- <UserControl.Styles>
- <Style Selector="TextBox.fio" >
- <Setter Property="Width" Value="150"/>
- <Setter Property="Height" Value="30"/>
- <Setter Property="Margin" Value="0,15,20,15"/>
- <Setter Property="HorizontalAlignment" Value="Left"/>
- </Style>
- <Style Selector="Button.add" >
- <Setter Property="Width" Value="150"/>
- <Setter Property="Height" Value="30"/>
- <Setter Property="Margin" Value="20"/>
- <Setter Property="Padding" Value="10,0,10,0"/>
- <Setter Property="HorizontalContentAlignment" Value="Center"/>
- <Setter Property="VerticalContentAlignment" Value="Center"/>
- </Style>
- </UserControl.Styles>
- <Grid>
- <StackPanel Orientation="Vertical" HorizontalAlignment="Left" Margin="15">
- <StackPanel Orientation="Horizontal">
- <TextBox Watermark="Фамилия" Classes="fio" Text="{Binding AddTeacher.TSurname}"/>
- <TextBox Watermark="Имя" Classes="fio" Text="{Binding AddTeacher.TName}"/>
- <TextBox Watermark="Отчество" Classes="fio" Text="{Binding AddTeacher.TPatronymic}"/>
- </StackPanel>
- <DatePicker Margin="0,15,20,15" SelectedDate="{Binding AddTeacher.TBirthday}"/>
- <StackPanel Orientation="Horizontal">
- <RadioButton Content="Мужской" Margin="0,0,20,0" IsChecked="{Binding AddTeacher.TGenderM}"/>
- <RadioButton Content="Женский" Margin="0,15,20,15"/>
- </StackPanel>
- <StackPanel Orientation="Horizontal">
- <TextBlock Text="Стаж работы" VerticalAlignment="Center" Margin="0,0,20,0"/>
- <TextBox Text="{Binding AddTeacher.TExp}"/>
- </StackPanel>
- <TextBox Watermark="example@mail.com" Margin="0,10,10,0" Text="{Binding AddTeacher.TMail}"/>
- <TextBox Watermark="880005553535" Classes="fio" Text="{Binding AddTeacher.TPhone}"/>
- <StackPanel Orientation="Horizontal">
- <ComboBox Width="400" ItemsSource="{Binding AddTeacher.CollSub}" SelectedItem="{Binding AddTeacher.SelectSubject}" MaxDropDownHeight="250">
- <ComboBox.ItemTemplate>
- <DataTemplate>
- <TextBlock Text="{Binding NameSubjects}"/>
- </DataTemplate>
- </ComboBox.ItemTemplate>
- </ComboBox>
- <ListBox ItemsSource="{Binding AddTeacher.CollSubSelect}" Width="300" Height="150" Margin="30,0,0,0">
- <ListBox.ItemTemplate>
- <DataTemplate>
- <TextBlock Text="{Binding NameSubjects}"/>
- </DataTemplate>
- </ListBox.ItemTemplate>
- </ListBox>
- </StackPanel>
- <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
- <Button Content="Добавить" Classes="add" Command="{Binding ToAddNewTeacher}"/>
- <Button Content="Назад" Classes="add" Command="{Binding ToPersInf}"/>
- </StackPanel>
- </StackPanel>
- </Grid>
- </UserControl>
|