66 lines
3.5 KiB
XML
66 lines
3.5 KiB
XML
<Window x:Class="ToDoStylet.Pages.StudentView"
|
|
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:ToDoStylet.Pages"
|
|
xmlns:s ="https://github.com/canton7/Stylet"
|
|
xmlns:pu="clr-namespace:Panuon.UI.Silver;assembly=Panuon.UI.Silver"
|
|
mc:Ignorable="d"
|
|
Title="StudentView" Height="450" Width="800">
|
|
<Grid>
|
|
<DockPanel>
|
|
<DockPanel DockPanel.Dock="Left">
|
|
<Button DockPanel.Dock="Bottom" Click="{s:Action AddStudentModel}"
|
|
pu:ButtonHelper.ButtonStyle="Standard"
|
|
pu:ButtonHelper.CornerRadius="5">Add Student</Button>
|
|
|
|
<ListBox DockPanel.Dock="Top" Width="200" FontSize="13" ItemsSource="{Binding studentModels}" SelectedItem="{Binding SeletctStudentModel}" HorizontalContentAlignment="Stretch">
|
|
<ListBox.ItemTemplate>
|
|
<DataTemplate>
|
|
<DockPanel LastChildFill="False">
|
|
<TextBlock DockPanel.Dock="Left">Name:</TextBlock>
|
|
<TextBlock DockPanel.Dock="Left" Text="{Binding ST_Name}"/>
|
|
<Button DockPanel.Dock="Right" Command="{s:Action RemoveStudent}" CommandParameter="{Binding}">Fire</Button>
|
|
</DockPanel>
|
|
</DataTemplate>
|
|
</ListBox.ItemTemplate>
|
|
</ListBox>
|
|
</DockPanel>
|
|
|
|
<Grid DockPanel.Dock="Right" DataContext="{Binding SeletctStudentModel}">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<Label Grid.Row="0" Grid.Column="0" FontSize="15">Name:</Label>
|
|
<TextBox Grid.Row="0" Grid.Column="1" FontSize="15" Text="{Binding ST_Name}"/>
|
|
<Label Grid.Row="1" Grid.Column="0" FontSize="15">Gender:</Label>
|
|
<TextBox Grid.Row="1" Grid.Column="1" FontSize="15" Text="{Binding Gender}"/>
|
|
<Label Grid.Row="2" Grid.Column="0" FontSize="15">Age:</Label>
|
|
<TextBox Grid.Row="2" Grid.Column="1" FontSize="15" Text="{Binding Age}"/>
|
|
<Button Grid.Row="3" Grid.Column="0" Content="Message" Command="{s:Action ShowMessage}"
|
|
Height="30" VerticalAlignment="Top"
|
|
pu:ButtonHelper.ButtonStyle="Standard"
|
|
pu:ButtonHelper.CornerRadius="15"/>
|
|
<Button Grid.Row="5" Grid.Column="0" Content="TestParameter"
|
|
Command = "{s:Action ParmeterAlert}" CommandParameter="{Binding ST_Name}"
|
|
pu:ButtonHelper.ButtonStyle="Standard"
|
|
pu:ButtonHelper.CornerRadius="5"></Button>
|
|
|
|
</Grid>
|
|
</DockPanel>
|
|
</Grid>
|
|
</Window>
|