MainWindow.xaml 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <Window x:Class="bububu.MainWindow"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  5. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6. xmlns:local="clr-namespace:bububu"
  7. mc:Ignorable="d"
  8. Title="MainWindow" Height="450" Width="472">
  9. <Grid>
  10. <Grid.ColumnDefinitions>
  11. <ColumnDefinition Width="170"></ColumnDefinition>
  12. <ColumnDefinition Width="*"></ColumnDefinition>
  13. </Grid.ColumnDefinitions>
  14. <Grid.RowDefinitions>
  15. <RowDefinition></RowDefinition>
  16. <RowDefinition></RowDefinition>
  17. </Grid.RowDefinitions>
  18. <Label Grid.Row="0" Grid.Column="0" HorizontalAlignment="Center" VerticalAlignment="Top" FontSize="20">Предметы:</Label>
  19. <ListBox VerticalAlignment="Stretch" Margin="5, 40, 5, 0" ItemsSource="{Binding Schedules}" SelectedItem="{Binding SelectedTeacher, Mode=TwoWay}">
  20. <ListBox.ItemTemplate>
  21. <DataTemplate>
  22. <TextBlock FontSize="24" Text="{Binding Obj}"></TextBlock>
  23. </DataTemplate>
  24. </ListBox.ItemTemplate>
  25. </ListBox>
  26. <Label Grid.Row="0" Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Top" FontSize="20">Преподаватели:</Label>
  27. <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>
  28. <StackPanel Orientation="Vertical" Grid.Row="1" Grid.Column="1" Margin="10">
  29. <TextBlock Grid.Row="1" Grid.Column="1" VerticalAlignment="Top" Margin="5" FontSize="18" Text="{Binding SelectedTeacher.Comment}"></TextBlock>
  30. <RichTextBox Margin="5" x:Name="TitleBox" FontSize="20" ></RichTextBox>
  31. <TextBox Margin="5" x:Name="TeacherBox" FontSize="20" TextAlignment="Center"></TextBox>
  32. </StackPanel>
  33. <StackPanel Orientation="Vertical" Grid.Row="1" Grid.Column="0">
  34. <TextBlock Grid.Row="1" Grid.Column="0" VerticalAlignment="Top" Margin="5,15,5,5" FontSize="18" HorizontalAlignment="Center">Описание:</TextBlock>
  35. <Button x:Name="buttonAdd" Command="{Binding AddCommand}" FontSize="20" Margin="5">Добавить</Button>
  36. <Button x:Name="buttonDelete" Command="{Binding DeleteCommand}" CommandParameter="{Binding SelectedTeacher}" FontSize="20" Margin="5">Удалить</Button>
  37. </StackPanel>
  38. </Grid>
  39. </Window>