1
0
mirror of https://github.com/SirLecram/HospitalServerManager synced 2024-11-09 13:00:26 +01:00
admissionManager/obj/x86/Debug/View/UserControls/ColumnListView.xaml
2018-11-18 18:49:40 +01:00

91 lines
4.4 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" >
<Grid x:ConnectionId='2' >
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<TextBlock x:ConnectionId='3' Name="ItemId"
Grid.Column="0" />
<TextBlock x:ConnectionId='4' Name="ItemName"
Grid.Column="1"/>
<TextBlock x:ConnectionId='5'
Grid.Column="2"/>
<TextBlock x:ConnectionId='6'
Grid.Column="3"/>
<TextBlock x:ConnectionId='7'
Grid.Column="4"/>
<TextBlock x:ConnectionId='8'
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>