pgAgentsOutput.xaml 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <Page x:Class="DemoExam.pgAgentsOutput"
  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:DemoExam"
  7. mc:Ignorable="d"
  8. d:DesignHeight="450" d:DesignWidth="800"
  9. Title="pgAgentsOutput">
  10. <Page.Resources>
  11. <DataTemplate x:Key="agentTemplate">
  12. <StackPanel Orientation="Horizontal">
  13. <TextBlock Text="{Binding ID}"/>
  14. <Image Source="{Binding Img}" Width="100" Height="100"/>
  15. <StackPanel>
  16. <StackPanel Orientation="Horizontal">
  17. <TextBlock Text="{Binding StringFormat={}{0} |, Path=AgentType.Title}"/>
  18. <TextBlock Text="{Binding StringFormat={} {0}, Path=Title}"/>
  19. </StackPanel>
  20. <TextBlock Text="{Binding StringFormat={}{0} продаж за год, Path=SalesCount}"/>
  21. <TextBlock Text="{Binding Phone}"/>
  22. <TextBlock Text="{Binding StringFormat={}Приоритетность: {0}, Path=Priority}"/>
  23. </StackPanel>
  24. <TextBlock Text="{Binding StringFormat={}{0}%, Path=Discount}" HorizontalAlignment="Right"/>
  25. </StackPanel>
  26. </DataTemplate>
  27. </Page.Resources>
  28. <Grid>
  29. <Grid.RowDefinitions>
  30. <RowDefinition Height="70"/>
  31. <RowDefinition/>
  32. <RowDefinition Height="50"/>
  33. </Grid.RowDefinitions>
  34. <StackPanel Grid.Row="0" Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center">
  35. <TextBox x:Name="tbSearch" Width="200" TextChanged="tbSearch_TextChanged"/>
  36. <ComboBox x:Name="cbSort" Width="200" Margin="50 0 50 0" SelectionChanged="cbChanged"/>
  37. <ComboBox x:Name="cbFilter" Width="200" SelectionChanged="cbChanged"/>
  38. </StackPanel>
  39. <ScrollViewer Grid.Row="1">
  40. <StackPanel Grid.Row="1">
  41. <ListBox x:Name="lbAgents" ItemTemplate="{StaticResource agentTemplate}" Grid.Row="1" SelectionMode="Multiple" SelectionChanged="lbAgents_SelectionChanged"/>
  42. </StackPanel>
  43. </ScrollViewer>
  44. <StackPanel Grid.Row="2" Orientation="Horizontal" VerticalAlignment="Center">
  45. <Button x:Name="btnChangePriority" Content="Изменить приоритет на ..." Visibility="Hidden" Click="btnChangePriority_Click"/>
  46. </StackPanel>
  47. </Grid>
  48. </Page>