ListViewPage.xaml 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <Page x:Class="DB.Pages.ListViewPage"
  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:DB.Pages"
  7. mc:Ignorable="d"
  8. d:DesignHeight="450" d:DesignWidth="800"
  9. Title="ListViewPage">
  10. <Grid>
  11. <Grid.RowDefinitions>
  12. <RowDefinition Height="30"></RowDefinition>
  13. <RowDefinition></RowDefinition>
  14. <RowDefinition Height="30"></RowDefinition>
  15. </Grid.RowDefinitions>
  16. <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
  17. <ComboBox Name="CBFIlter" SelectionChanged="CBFIlter_SelectionChanged" Height="30" Width="150" Margin="0,0,50,0"/>
  18. <ComboBox Name="CBSort" SelectionChanged="CBSort_SelectionChanged" Height="30" Width="150" Margin="0,0,50,0"/>
  19. <TextBox Name="TBSearch" TextChanged="TBSearch_TextChanged" Style="{StaticResource TBStyle}" />
  20. </StackPanel>
  21. <Button Name="BTNAdd" Grid.Row="2" Click="BTNAdd_Click">Add</Button>
  22. <ListView Name="LVService" Grid.Row="1">
  23. <ListView.ItemsPanel>
  24. <ItemsPanelTemplate>
  25. <WrapPanel Orientation="Vertical" HorizontalAlignment="Center"/>
  26. </ItemsPanelTemplate>
  27. </ListView.ItemsPanel>
  28. <ListView.ItemTemplate>
  29. <DataTemplate>
  30. <Border BorderBrush="Black" BorderThickness="1" CornerRadius="5" Height="100" Width="400" Background="{Binding BGColor}">
  31. <StackPanel Orientation="Vertical">
  32. <TextBlock Name="TBTitle" Text="{Binding Title}"/>
  33. <TextBlock Name="TBCost" Text="{Binding Cost}"/>
  34. <TextBlock Name="TBDate" Uid="{Binding ID}" Loaded="TBDate_Loaded"/>
  35. <StackPanel Orientation="Horizontal">
  36. <Button Name="BTNChange" Uid="{Binding ID}" Click="BTNChange_Click" Height="50" Width="100">Change</Button>
  37. <Button Name="BTNDelete" Uid="{Binding ID}" Click="BTNDelete_Click" Height="50" Width="100">Delete</Button>
  38. </StackPanel>
  39. </StackPanel>
  40. </Border>
  41. </DataTemplate>
  42. </ListView.ItemTemplate>
  43. </ListView>
  44. </Grid>
  45. </Page>