AgentPage.xaml 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <Page x:Class="ShabaninDemoEkz.AgentPage"
  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:ShabaninDemoEkz"
  7. mc:Ignorable="d"
  8. d:DesignHeight="450" d:DesignWidth="800"
  9. Title="AgentPage">
  10. <Page.Resources>
  11. <DataTemplate x:Key="ListAgentD">
  12. <Border BorderBrush="Black" BorderThickness="2" >
  13. <StackPanel Orientation="Horizontal" Background="{Binding grencolor}">
  14. <StackPanel Orientation="Horizontal" Width="600">
  15. <Image Height="100" Width="100" Source="{Binding Logo}"/>
  16. <StackPanel Orientation="Vertical">
  17. <TextBlock Text="{Binding typea}">
  18. <Run Text=" | "/>
  19. <Run Text="{Binding Title}"/>
  20. </TextBlock>
  21. <TextBlock Text="{Binding counts}">
  22. <Run Text=" продаж за год"/>
  23. </TextBlock>
  24. <TextBlock Text="{Binding Phone}"/>
  25. <TextBlock Text="Приоритетность:">
  26. <Run Text="{Binding Priority}"/>
  27. </TextBlock>
  28. </StackPanel>
  29. </StackPanel>
  30. <StackPanel>
  31. <TextBlock Text="{Binding skidka}" Margin="0 0 0 10" Width="40">
  32. <Run Text="%" />
  33. </TextBlock>
  34. </StackPanel>
  35. </StackPanel>
  36. </Border>
  37. </DataTemplate>
  38. </Page.Resources>
  39. <Grid>
  40. <Grid.ColumnDefinitions>
  41. <ColumnDefinition Width="50"/>
  42. <ColumnDefinition Width="*"/>
  43. </Grid.ColumnDefinitions>
  44. <Grid.RowDefinitions>
  45. <RowDefinition Height="60"/>
  46. <RowDefinition Height="*"/>
  47. </Grid.RowDefinitions>
  48. <StackPanel Grid.ColumnSpan="2" Orientation="Horizontal">
  49. <GroupBox Header="Поиск" Width="150">
  50. <TextBox x:Name="searchBar" TextChanged="searchBar_TextChanged" />
  51. </GroupBox>
  52. <GroupBox Header="Сортировка">
  53. <ComboBox Name="SortCMB" SelectionChanged="SortCMB_SelectionChanged">
  54. <ComboBoxItem Content="Без сортировки"/>
  55. <ComboBoxItem Content="Наименование ↑"/>
  56. <ComboBoxItem Content="Наименование ↓"/>
  57. <ComboBoxItem Content="Размер скидки ↑"/>
  58. <ComboBoxItem Content="Размер скидки ↓"/>
  59. <ComboBoxItem Content="Приоритет агента ↑"/>
  60. <ComboBoxItem Content="Приоритет агента ↓"/>
  61. </ComboBox>
  62. </GroupBox>
  63. <GroupBox Header="Фильтрация">
  64. <ComboBox Name="FilterCmb" SelectionChanged="FilterCmb_SelectionChanged"/>
  65. </GroupBox>
  66. <Button x:Name="ChangePrior" Content="Изменить приоритет на ..." Height="45" Visibility="Collapsed" Click="ChangePrior_Click"/>
  67. <Button x:Name="AddAgent" Content="Добавить агента" Height="45" Click="AddAgent_Click"/>
  68. </StackPanel>
  69. <ListView x:Name="AgentList" ItemTemplate="{StaticResource ListAgentD}" Grid.ColumnSpan="2" Grid.Row="1" SelectionMode="Extended" SelectionChanged="AgentList_SelectionChanged" MouseDoubleClick="AgentList_MouseDoubleClick"/>
  70. </Grid>
  71. </Page>