ShowAgentPage.xaml 4.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <Page x:Class="Golyshev43p180322.ShowAgentPage"
  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:Golyshev43p180322"
  7. mc:Ignorable="d"
  8. d:DesignHeight="450" d:DesignWidth="800"
  9. Title="ShowAgentPage">
  10. <Page.Resources>
  11. <BitmapImage x:Key="defaulimage" UriSource="/Resources/picture.png"></BitmapImage>
  12. </Page.Resources>
  13. <Grid>
  14. <ScrollViewer>
  15. <StackPanel>
  16. <WrapPanel Orientation="Horizontal" HorizontalAlignment="Center">
  17. <TextBox Width="350" Height="25" Name="TBTextFilter" TextChanged="TBTextFilter_TextChanged"></TextBox>
  18. <ComboBox Name="CBFilter" Width="150" Height="25" Margin="5,0,5,0" SelectionChanged="CBFilter_SelectionChanged"></ComboBox>
  19. <StackPanel Orientation="Vertical">
  20. <ComboBox Name="CBSort" Width="150" Height="25"></ComboBox>
  21. <Button Click="Button_Click">По возрастанию</Button>
  22. <Button Click="Button_Click_1">По убыванию</Button>
  23. </StackPanel>
  24. </WrapPanel>
  25. <StackPanel>
  26. <Button Name="btnAddNewAgent" Click="btnAddNewAgent_Click">Добавить агента</Button>
  27. </StackPanel>
  28. <ListView Name="LVAgent" ScrollViewer.HorizontalScrollBarVisibility="Disabled">
  29. <ListView.ItemsPanel>
  30. <ItemsPanelTemplate>
  31. <WrapPanel HorizontalAlignment="Center"></WrapPanel>
  32. </ItemsPanelTemplate>
  33. </ListView.ItemsPanel>
  34. <ListView.ItemTemplate>
  35. <DataTemplate>
  36. <Border Padding="5" BorderThickness="1" BorderBrush="Black">
  37. <Grid Width="400" Height="150">
  38. <Grid.ColumnDefinitions>
  39. <ColumnDefinition></ColumnDefinition>
  40. <ColumnDefinition Width="4*"></ColumnDefinition>
  41. <ColumnDefinition></ColumnDefinition>
  42. </Grid.ColumnDefinitions>
  43. <Image Grid.Column="0" Source="{Binding Logo,TargetNullValue={StaticResource defaulimage}}" Width="60" Height="60"></Image>
  44. <StackPanel Orientation="Vertical" Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center">
  45. <TextBlock Name="TBTypeTitle" Loaded="TBTypeTitle_Loaded" Uid="{Binding ID}" TextWrapping="Wrap"></TextBlock>
  46. <TextBlock Name="TBSellsPerYear" Loaded="TBSellsPerYear_Loaded" Uid="{Binding ID}"></TextBlock>
  47. <TextBlock Name="TBPhone" Text="{Binding Phone}"></TextBlock>
  48. <TextBlock Name="TBPriority" Text="{Binding Priority, StringFormat={}Приоритетность: {0}}"></TextBlock>
  49. <Button Name="btnChange" Click="btnChange_Click" Uid="{Binding ID}">Редактировать</Button>
  50. </StackPanel>
  51. <StackPanel Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Center">
  52. <TextBlock Name="TBDiscount" Loaded="TBDiscount_Loaded" Uid="{Binding ID}"></TextBlock>
  53. </StackPanel>
  54. </Grid>
  55. </Border>
  56. </DataTemplate>
  57. </ListView.ItemTemplate>
  58. </ListView>
  59. </StackPanel>
  60. </ScrollViewer>
  61. </Grid>
  62. </Page>