MainWindow.xaml 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. <Window x:Class="WpfApp1.MainWindow"
  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:WpfApp1"
  7. mc:Ignorable="d"
  8. Title="Приятный шелест" MinHeight="550" Height="550" MaxHeight="550" MinWidth="900" Width="900" MaxWidth="900">
  9. <Grid>
  10. <Grid.ColumnDefinitions>
  11. <ColumnDefinition Width="150"/>
  12. <ColumnDefinition Width="*"/>
  13. </Grid.ColumnDefinitions>
  14. <Image
  15. Margin="5"
  16. Source="/image/Приятный шелест.png"
  17. VerticalAlignment="Top"/>
  18. <TextBlock
  19. Text="Приятный шелест"
  20. Margin="0,0,0,190"
  21. HorizontalAlignment="Center"
  22. VerticalAlignment="Center"
  23. FontSize="20"/>
  24. <StackPanel
  25. Orientation="Vertical"
  26. VerticalAlignment="Bottom"
  27. Margin="5">
  28. <Button
  29. x:Name="AddAgent"
  30. Content="Добавить агент"
  31. Margin="0,0,0,5"
  32. Background="#46B29D"
  33. Click="AddAgent_Click">
  34. </Button>
  35. <Button
  36. x:Name="Exit"
  37. Content="Выход"
  38. Background="#46B29D"
  39. Click="Exit_Click"/>
  40. </StackPanel>
  41. <Grid
  42. Grid.Column="1">
  43. <Grid.RowDefinitions>
  44. <RowDefinition Height="30"/>
  45. <RowDefinition Height="*"/>
  46. <RowDefinition Height="30"/>
  47. </Grid.RowDefinitions>
  48. <WrapPanel Grid.Row="0">
  49. <Label
  50. Content="Введите для поиска:"
  51. VerticalAlignment="Center"/>
  52. <TextBox x:Name="Poisk"
  53. VerticalAlignment="Center"
  54. Width="150"
  55. SelectionChanged="Poisk_SelectionChanged"/>
  56. <Label Content="Сортировка:"
  57. VerticalAlignment="Center"/>
  58. <ComboBox Name="Sort"
  59. VerticalAlignment="Center"
  60. Width="100"
  61. SelectionChanged="Sort_SelectionChanged"
  62. ItemsSource="{Binding SotrList}"/>
  63. <Label Content="Фильтрация:"
  64. VerticalAlignment="Center"/>
  65. <ComboBox Name="Filtr"
  66. VerticalAlignment="Center"
  67. Width="100"
  68. ItemsSource="{Binding Filtr}"/>
  69. </WrapPanel>
  70. <ListView Grid.Row="1"
  71. x:Name="MainListView"
  72. SelectionChanged="MainListView_SelectionChanged"
  73. MouseDoubleClick="MainListView_MouseDoubleClick"
  74. ItemsSource="{Binding AgentList}">
  75. <ListView.ItemContainerStyle>
  76. <Style TargetType="ListViewItem">
  77. <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
  78. </Style>
  79. </ListView.ItemContainerStyle>
  80. <ListView.ItemTemplate>
  81. <DataTemplate>
  82. <Border BorderBrush="Black"
  83. BorderThickness="1"
  84. Background="{Binding BackgroundColor}"
  85. >
  86. <Grid Margin="10" HorizontalAlignment="Stretch">
  87. <Grid.ColumnDefinitions>
  88. <ColumnDefinition Width="64"/>
  89. <ColumnDefinition Width="*"/>
  90. <ColumnDefinition Width="auto"/>
  91. </Grid.ColumnDefinitions>
  92. <Image Width="64" Height="64" Source="{Binding ImagePres}"/>
  93. <StackPanel
  94. Grid.Column="1"
  95. Margin="5"
  96. Orientation="Vertical">
  97. <TextBlock
  98. Text="{Binding TypAndNameAgent}" />
  99. <TextBlock Text="{Binding ProdazhZaGod}"/>
  100. <TextBlock Text="{Binding Phone}"/>
  101. <TextBlock Text="{Binding Prioritys}"/>
  102. </StackPanel>
  103. <StackPanel
  104. Grid.Column="2"
  105. Margin="10"
  106. HorizontalAlignment="Right"
  107. Orientation="Vertical">
  108. <TextBlock Text="{Binding Prozents}"/>
  109. </StackPanel>
  110. </Grid>
  111. </Border>
  112. </DataTemplate>
  113. </ListView.ItemTemplate>
  114. </ListView>
  115. </Grid>
  116. </Grid>
  117. </Window>