StudentManager/StudentManager/Editor/QuestionsView.xaml
2024-09-09 18:57:50 +08:00

39 lines
2.3 KiB
XML

<UserControl x:Class="StudentManager.Editor.QuestionsView"
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:StudentManager.Editor"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<UserControl.Resources>
<Style x:Key="TextStyle" TargetType="{x:Type TextBlock}">
<Setter Property="Margin" Value="10,5"/>
</Style>
</UserControl.Resources>
<Grid>
<ListBox ItemsSource="{Binding QuestionDatas}">
<!--<i:Interaction.Triggers>
<i:EventTrigger EventName="SelectionChanged">
<i:InvokeCommandAction x:Name="menuTrigger" Command="{Binding navigateCommand}" CommandParameter="{Binding ElementName=menu, Path=SelectedItem}"/>
</i:EventTrigger>
</i:Interaction.Triggers>-->
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<TextBlock Width="50" Style="{StaticResource TextStyle}" Text="{Binding Id}"/>
<TextBlock Width="50" Style="{StaticResource TextStyle}" Text="{Binding Type}"/>
<TextBlock Width="50" Style="{StaticResource TextStyle}" Text="{Binding Stem}"/>
<TextBlock Width="50" Style="{StaticResource TextStyle}" Text="{Binding Answer}"/>
<TextBlock Width="50" Style="{StaticResource TextStyle}" Text="{Binding DifficultyLevel}"/>
<TextBlock Width="50" Style="{StaticResource TextStyle}" Text="{Binding Category}"/>
<TextBlock Width="50" Style="{StaticResource TextStyle}" Text="{Binding Tags}"/>
<TextBlock Width="50" Style="{StaticResource TextStyle}" Text="{Binding Source}"/>
<TextBlock Width="50" Style="{StaticResource TextStyle}" Text="{Binding Status}"/>
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</Grid>
</UserControl>