DetailWindow.xaml 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <Window x:Class="wpf_listbox.Windows.DetailWindow"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  5. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6. xmlns:local="clr-namespace:wpf_listbox.Windows"
  7. mc:Ignorable="d"
  8. Title="Экскурсовод" Height="auto" Width="auto">
  9. <Window.Resources>
  10. <BitmapImage
  11. x:Key='defaultImage'
  12. UriSource='./img/1.webp' />
  13. <Style
  14. TargetType="Button">
  15. <Setter
  16. Property="FontFamily"
  17. Value="Verdana" />
  18. <Setter
  19. Property="Background"
  20. Value="PapayaWhip" />
  21. <Setter
  22. Property="Foreground"
  23. Value="Peru" />
  24. <Setter
  25. Property="Margin"
  26. Value="10" />
  27. </Style>
  28. </Window.Resources>
  29. <Grid RenderTransformOrigin="0.498,0.573">
  30. <Grid.ColumnDefinitions>
  31. <ColumnDefinition Width="auto"/>
  32. <ColumnDefinition Width="*"/>
  33. <ColumnDefinition Width="auto"/>
  34. </Grid.ColumnDefinitions>
  35. <StackPanel
  36. Grid.Column="1">
  37. <TextBlock Text="Имя:">
  38. <Run Text="{Binding Name}"/>
  39. </TextBlock>
  40. <TextBlock Text="Цена за экскурсию:">
  41. <Run Text="{Binding Price}"/>
  42. </TextBlock>
  43. <TextBlock Text="Место:">
  44. <Run Text="{Binding Place}"/>
  45. </TextBlock>
  46. <TextBlock Text="Пол:">
  47. <Run Text="{Binding Gender}"/>
  48. </TextBlock>
  49. <TextBlock Text="В компании с: ">
  50. <Run Text="{Binding dateOfConnections, StringFormat='dd.MM.yyyy'}"/>
  51. </TextBlock>
  52. <TextBlock Text="Является ли фаворитом:">
  53. <Run Text="{Binding IsFavorite}"/>
  54. </TextBlock>
  55. </StackPanel>
  56. <Button
  57. x:Name="ExitButton"
  58. Grid.Column="1"
  59. Content="Выход"
  60. Click="ExitButton_Click"
  61. Height="50" />
  62. <Image Grid.Column="0" Source="{StaticResource defaultImage}" Width="100" Height="100"/>
  63. </Grid>
  64. </Window>