123456789101112131415161718192021222324252627282930313233343536373839 |
- <Window x:Class="bububu.MainWindow"
- 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:bububu"
- mc:Ignorable="d"
- Title="MainWindow" Height="450" Width="472">
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="170"></ColumnDefinition>
- <ColumnDefinition Width="*"></ColumnDefinition>
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition></RowDefinition>
- <RowDefinition></RowDefinition>
- </Grid.RowDefinitions>
- <Label Grid.Row="0" Grid.Column="0" HorizontalAlignment="Center" VerticalAlignment="Top" FontSize="20">Предметы:</Label>
- <ListBox VerticalAlignment="Stretch" Margin="5, 40, 5, 0" ItemsSource="{Binding Schedules}" SelectedItem="{Binding SelectedTeacher, Mode=TwoWay}">
- <ListBox.ItemTemplate>
- <DataTemplate>
- <TextBlock FontSize="24" Text="{Binding Obj}"></TextBlock>
- </DataTemplate>
- </ListBox.ItemTemplate>
- </ListBox>
- <Label Grid.Row="0" Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Top" FontSize="20">Преподаватели:</Label>
- <TextBox Grid.Row="0" Grid.Column="1" VerticalAlignment="Top" FontSize="18" HorizontalAlignment="Center" Margin="5,40,5,0" Text="{Binding SelectedTeacher.Teacher, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"></TextBox>
- <StackPanel Orientation="Vertical" Grid.Row="1" Grid.Column="1" Margin="10">
- <TextBlock Grid.Row="1" Grid.Column="1" VerticalAlignment="Top" Margin="5" FontSize="18" Text="{Binding SelectedTeacher.Comment}"></TextBlock>
- <RichTextBox Margin="5" x:Name="TitleBox" FontSize="20" ></RichTextBox>
- <TextBox Margin="5" x:Name="TeacherBox" FontSize="20" TextAlignment="Center"></TextBox>
- </StackPanel>
- <StackPanel Orientation="Vertical" Grid.Row="1" Grid.Column="0">
- <TextBlock Grid.Row="1" Grid.Column="0" VerticalAlignment="Top" Margin="5,15,5,5" FontSize="18" HorizontalAlignment="Center">Описание:</TextBlock>
- <Button x:Name="buttonAdd" Command="{Binding AddCommand}" FontSize="20" Margin="5">Добавить</Button>
- <Button x:Name="buttonDelete" Command="{Binding DeleteCommand}" CommandParameter="{Binding SelectedTeacher}" FontSize="20" Margin="5">Удалить</Button>
- </StackPanel>
- </Grid>
- </Window>
|