PageNearNote.xaml 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <Page x:Class="School.PageNearNote"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:School"
  7. mc:Ignorable="d"
  8. d:MinHeight="500" d:MinWidth="800"
  9. Title="Ближайшие записи">
  10. <Grid>
  11. <Grid.RowDefinitions>
  12. <RowDefinition Height="50"/>
  13. <RowDefinition Height="350"/>
  14. <RowDefinition Height="50"/>
  15. </Grid.RowDefinitions>
  16. <Grid Grid.Row="0">
  17. <TextBlock x:Name="Title" HorizontalAlignment="Center" VerticalAlignment="Center" Text="Ближайшие записи" Style="{StaticResource HeaderText}"/>
  18. </Grid>
  19. <ListView Name="ClassNote" Grid.Row="1" ScrollViewer.HorizontalScrollBarVisibility="Hidden" HorizontalContentAlignment="Stretch" AlternationCount="2">
  20. <ListView.ItemContainerStyle>
  21. <Style TargetType="ListViewItem">
  22. <Style.Triggers>
  23. <Trigger Property="ItemsControl.AlternationIndex" Value="0">
  24. <Setter Property="Background" Value="#e7fabf" />
  25. </Trigger>
  26. <Trigger Property="ItemsControl.AlternationIndex" Value="1">
  27. <Setter Property="Background" Value="White" />
  28. </Trigger>
  29. </Style.Triggers>
  30. </Style>
  31. </ListView.ItemContainerStyle>
  32. <ListView.ItemTemplate>
  33. <DataTemplate>
  34. <Border Style="{StaticResource BorderStyle}">
  35. <Grid VerticalAlignment="Center" >
  36. <StackPanel>
  37. <TextBlock Text="{Binding Service.Title,StringFormat=Наименование услуги: {0}}"></TextBlock>
  38. <TextBlock Text="{Binding Client.FullName,StringFormat=ФИО клиента: {0}}"></TextBlock>
  39. <TextBlock Text="{Binding Client.Email,StringFormat=Email: {0}}"></TextBlock>
  40. <TextBlock Text="{Binding Client.Phone,StringFormat=Телефон: {0}}"></TextBlock>
  41. <TextBlock Text="{Binding StartTime, StringFormat=Дата и Время записи: {0:dd MMMM yyyy HH:mm}}"></TextBlock>
  42. <TextBlock Text="{Binding RemainingTime,StringFormat=Оставшееся время до занятия: {0}}" Foreground="{Binding NearetsNote}"/>
  43. </StackPanel>
  44. </Grid>
  45. </Border>
  46. </DataTemplate>
  47. </ListView.ItemTemplate>
  48. </ListView>
  49. <Button Grid.Row="2" Name="Home" Template="{StaticResource Button}" Click="Home_Click">На главную</Button>
  50. </Grid>
  51. </Page>