Agents.xaml 4.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <Page x:Class="PracticaDemoexam.Pages.Agents"
  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:PracticaDemoexam.Pages"
  7. mc:Ignorable="d"
  8. d:DesignHeight="450" d:DesignWidth="800"
  9. Title="Agents">
  10. <Page.Resources>
  11. <Style TargetType="ListBoxItem">
  12. <Style.Triggers>
  13. <DataTrigger Binding="{Binding Path=Discount}" Value="25%">
  14. <Setter Property="Background" Value="#46B29D"/>
  15. </DataTrigger>
  16. </Style.Triggers>
  17. </Style>
  18. </Page.Resources>
  19. <Grid>
  20. <Grid.ColumnDefinitions>
  21. <ColumnDefinition Width="341*"/>
  22. <ColumnDefinition Width="248"/>
  23. <ColumnDefinition Width="211"/>
  24. </Grid.ColumnDefinitions>
  25. <Grid.RowDefinitions>
  26. <RowDefinition Height="28"/>
  27. <RowDefinition/>
  28. <RowDefinition Height="21"/>
  29. </Grid.RowDefinitions>
  30. <TextBox x:Name="tbSearch" Grid.Column="0" Grid.Row="0" TextChanged="tbSearch_TextChanged"/>
  31. <StackPanel Orientation="Horizontal" Grid.Column="1" Grid.Row="0" MinWidth="248">
  32. <ComboBox x:Name="cbSort" SelectionChanged="cbSort_SelectionChanged" MinWidth="200"/>
  33. <StackPanel Orientation="Vertical">
  34. <RadioButton x:Name="rbUb" Content="убыв" Click="RadioButton_Click"/>
  35. <RadioButton x:Name="rbVz" Content="возр" Click="RadioButton_Click"/>
  36. </StackPanel>
  37. </StackPanel>
  38. <ComboBox x:Name="cbFilter" Grid.Column="2" Grid.Row="0" SelectionChanged="cbFilter_SelectionChanged"/>
  39. <ListBox x:Name="lbAgents" Grid.Row="1" Grid.ColumnSpan="3" SelectionMode="Multiple" SelectionChanged="lbAgents_SelectionChanged">
  40. <ListBox.ItemTemplate>
  41. <DataTemplate>
  42. <StackPanel Orientation="Horizontal" >
  43. <Image Source="{Binding Path=AgentLogo}" Width="100" Height="100"/>
  44. <StackPanel Orientation="Vertical">
  45. <StackPanel Orientation="Horizontal">
  46. <TextBlock Text="{Binding Path=AgentType}"/>
  47. <TextBlock Text="|"/>
  48. <TextBlock Text="{Binding Path=Agent.Title}"/>
  49. </StackPanel>
  50. <TextBlock Text="{Binding Path=YearSales}"/>
  51. <TextBlock Text="{Binding Path=Agent.Phone}"/>
  52. <StackPanel Orientation="Horizontal">
  53. <TextBlock Text="Приоритетность: "/>
  54. <TextBlock Text="{Binding Path=Agent.Priority}"/>
  55. </StackPanel>
  56. </StackPanel>
  57. <StackPanel HorizontalAlignment="Right" Margin="400,0,0,0">
  58. <TextBlock x:Name="tblDiscount" Text="{Binding Path=Discount}"/>
  59. </StackPanel>
  60. </StackPanel>
  61. </DataTemplate>
  62. </ListBox.ItemTemplate>
  63. </ListBox>
  64. <StackPanel Orientation="Horizontal" Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="2" HorizontalAlignment="Right" Margin="0,0,10,0">
  65. <Button x:Name="bLeft" Content="&lt;" Click="bLeft_Click"/>
  66. <ListBox x:Name="lbPogination" SelectionChanged="lbPogination_SelectionChanged">
  67. <ListBox.ItemsPanel>
  68. <ItemsPanelTemplate>
  69. <StackPanel Orientation="Horizontal"/>
  70. </ItemsPanelTemplate>
  71. </ListBox.ItemsPanel>
  72. </ListBox>
  73. <Button x:Name="bRight" Content=">" Click="bRight_Click"/>
  74. </StackPanel>
  75. </Grid>
  76. </Page>