MainPage.xaml 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <Page x:Class="PRShelest.MainPage"
  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:PRShelest"
  7. mc:Ignorable="d"
  8. d:DesignHeight="450" d:DesignWidth="800"
  9. Title="MainPage">
  10. <Page.Resources>
  11. <BitmapImage x:Key="defaultimage" UriSource="/Resources/picture.png"></BitmapImage>
  12. </Page.Resources>
  13. <Grid>
  14. <Grid.RowDefinitions>
  15. <RowDefinition Height="170"></RowDefinition>
  16. <RowDefinition></RowDefinition>
  17. </Grid.RowDefinitions>
  18. <StackPanel Orientation="Horizontal" VerticalAlignment="Top" HorizontalAlignment="Center">
  19. <Image Source="/Resources/Приятный шелест.png" Width="60"></Image>
  20. <TextBlock VerticalAlignment="Center" Margin="20,0,0,0" FontSize="20">Приятный шелест</TextBlock>
  21. </StackPanel>
  22. <StackPanel Orientation="Horizontal">
  23. <TextBox Name="TBSearch" TextChanged="TBSearch_TextChanged" Width="400" Height="20" Margin="40,0,0,0"></TextBox>
  24. <StackPanel VerticalAlignment="Center" Margin="20,44,20,0">
  25. <ComboBox Name="CBSort" Width="150" Height="20"></ComboBox>
  26. <StackPanel Orientation="Horizontal" Margin="0,20,0,0">
  27. <Button Name="btnSortUb" Click="btnSortUb_Click" Width="65">По убыв.</Button>
  28. <Button Name="btnSortVo" Click="btnSortVo_Click" Width="65" Margin="20,0,0,0">По возр.</Button>
  29. </StackPanel>
  30. </StackPanel>
  31. <ComboBox Name="CBFilt" SelectionChanged="CBFilt_SelectionChanged" Width="150" Height="20"></ComboBox>
  32. </StackPanel>
  33. <ListView Name="LVAgent" Grid.Row="1" ScrollViewer.HorizontalScrollBarVisibility="Disabled">
  34. <ListView.ItemsPanel>
  35. <ItemsPanelTemplate>
  36. <WrapPanel HorizontalAlignment="Center"></WrapPanel>
  37. </ItemsPanelTemplate>
  38. </ListView.ItemsPanel>
  39. <ListView.ItemTemplate>
  40. <DataTemplate>
  41. <Border Width="400" Height="100" Padding="5" CornerRadius="5" BorderThickness="1" BorderBrush="#46B29D" Background="#C6D7FF" >
  42. <Grid>
  43. <StackPanel Orientation="Horizontal">
  44. <Image Width="70" Height="50" Source="{Binding Logo, TargetNullValue={StaticResource defaultimage}}"></Image>
  45. <StackPanel>
  46. <TextBlock Text="{Binding Header}"></TextBlock>
  47. <TextBlock Text="{Binding Phone}"></TextBlock>
  48. <TextBlock Text="{Binding Priority, StringFormat={}Приоритетность: {0}}"></TextBlock>
  49. </StackPanel>
  50. </StackPanel>
  51. </Grid>
  52. </Border>
  53. </DataTemplate>
  54. </ListView.ItemTemplate>
  55. </ListView>
  56. </Grid>
  57. </Page>