mirror of
https://github.com/SirLecram/HospitalServerManager
synced 2025-01-08 21:27:34 +01:00
90 lines
4.2 KiB
XML
90 lines
4.2 KiB
XML
<UserControl
|
|
x:Class="HospitalServerManager.View.UserControls.ColumnListView"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:local="using:HospitalServerManager.View.UserControls"
|
|
xmlns:viewModel="using:HospitalServerManager.ViewModel"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
mc:Ignorable="d"
|
|
d:DesignHeight="300"
|
|
d:DesignWidth="400">
|
|
|
|
<UserControl.Resources>
|
|
<DataTemplate x:Key="HeaderPatientListViewStyle">
|
|
<Grid >
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition/>
|
|
<ColumnDefinition/>
|
|
<ColumnDefinition/>
|
|
<ColumnDefinition/>
|
|
<ColumnDefinition/>
|
|
<ColumnDefinition/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<TextBlock Text="PESEL" Margin="8,0" Foreground="DarkRed" Grid.Column="0"/>
|
|
<TextBlock Text="Imię" Foreground="DarkRed" Grid.Column="1"/>
|
|
<TextBlock Text="Nazwisko" Foreground="DarkRed" Grid.Column="2"/>
|
|
<TextBlock Text="Data urodzenia" Foreground="DarkRed" Grid.Column="3"/>
|
|
<TextBlock Text="Stan" Foreground="DarkRed" Grid.Column="4"/>
|
|
<TextBlock Text="Płec" Foreground="DarkRed" Grid.Column="5"/>
|
|
</Grid>
|
|
</DataTemplate>
|
|
<DataTemplate x:Key="ItemPatientStyle" x:DataType="viewModel:PatientViewModel">
|
|
|
|
<Grid >
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition />
|
|
<ColumnDefinition />
|
|
<ColumnDefinition />
|
|
<ColumnDefinition/>
|
|
<ColumnDefinition/>
|
|
<ColumnDefinition/>
|
|
</Grid.ColumnDefinitions>
|
|
<TextBlock Name="ItemId"
|
|
Text="{x:Bind PrimaryKey}"
|
|
Grid.Column="0" />
|
|
<TextBlock Name="ItemName"
|
|
Text="{x:Bind Surname}"
|
|
Grid.Column="1"/>
|
|
<TextBlock Text="{x:Bind Name}"
|
|
Grid.Column="2"/>
|
|
<TextBlock Text="{x:Bind BirthDate}"
|
|
Grid.Column="3"/>
|
|
<TextBlock Text="{x:Bind PatientState}"
|
|
Grid.Column="4"/>
|
|
<TextBlock Text="{x:Bind PatientSex}"
|
|
Grid.Column="5"/>
|
|
</Grid>
|
|
</DataTemplate>
|
|
</UserControl.Resources>
|
|
|
|
<Grid Grid.Row="3" Grid.ColumnSpan="4" Margin="20, 5, 20, 5" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"
|
|
BorderBrush="AliceBlue" BorderThickness="2" >
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition/>
|
|
</Grid.RowDefinitions>
|
|
<ListView Grid.Row="0" Margin="20, 5, 20, 5" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"
|
|
HorizontalContentAlignment="Stretch" HeaderTemplate="{StaticResource HeaderPatientListViewStyle}">
|
|
|
|
</ListView>
|
|
<ListView Grid.Row="3" Grid.ColumnSpan="4" Margin="20, 5, 20, 5" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"
|
|
BorderBrush="AliceBlue" BorderThickness="2" ItemsSource="{Binding ModelsCollection}" ItemTemplate="{StaticResource ItemPatientStyle}"
|
|
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
|
ScrollViewer.IsVerticalRailEnabled="True"
|
|
ScrollViewer.VerticalScrollMode="Enabled"
|
|
ScrollViewer.HorizontalScrollMode="Enabled"
|
|
ScrollViewer.HorizontalScrollBarVisibility="Auto"
|
|
ScrollViewer.IsHorizontalRailEnabled="True">
|
|
|
|
<ListView.ItemContainerStyle>
|
|
<Style TargetType="ListViewItem">
|
|
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
|
|
</Style>
|
|
</ListView.ItemContainerStyle>
|
|
|
|
</ListView>
|
|
</Grid>
|
|
</UserControl>
|