PhotosPage.xaml 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <Window x:Class="NBAManagment.PhotosPage"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  5. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6. xmlns:local="clr-namespace:NBAManagment"
  7. mc:Ignorable="d"
  8. Title="PhotosPage" Height="450" Width="800">
  9. <Grid>
  10. <TextBlock Text="When you like a photo, you can right-click a photo and choose the download menu item in the context menu to download."
  11. HorizontalAlignment="Center" Margin="10"
  12. FontSize="14px"/>
  13. <Border BorderThickness="1" Margin="10, 35, 10, 45">
  14. <ListView Name="imagesListView" ItemsSource="{Binding PagedPictures.Filtered}" ScrollViewer.HorizontalScrollBarVisibility="Disabled" Margin="-1,0,1,0">
  15. <ListView.ItemsPanel>
  16. <ItemsPanelTemplate>
  17. <WrapPanel ItemHeight="180" ItemWidth="250"
  18. Width="{Binding Path=ActualWidth, ElementName=imagesListView}"
  19. Orientation="Horizontal"/>
  20. </ItemsPanelTemplate>
  21. </ListView.ItemsPanel>
  22. <ListView.ItemTemplate>
  23. <DataTemplate>
  24. <Grid>
  25. <Button Margin="5" PreviewMouseRightButtonDown="ShowDownloadPoput">
  26. <Image Source="{Binding Img}" Stretch="Fill"/>
  27. </Button>
  28. </Grid>
  29. </DataTemplate>
  30. </ListView.ItemTemplate>
  31. </ListView>
  32. </Border>
  33. <Popup x:Name="downloadPoput" Width="125" Height="30" IsOpen="False" Placement="Mouse" PopupAnimation="None" StaysOpen="False">
  34. <Grid>
  35. <Button Click="DownloadImage" Margin="0">
  36. <Button.Content>
  37. <StackPanel Orientation="Horizontal">
  38. <Image Source="/NBAManagement;component/Resources/download.png" Height="25" Width="25"/>
  39. <TextBlock Text="Download" FontSize="16px"/>
  40. </StackPanel>
  41. </Button.Content>
  42. </Button>
  43. </Grid>
  44. </Popup>
  45. <StackPanel VerticalAlignment="Bottom" HorizontalAlignment="Right" Margin="10" Orientation="Horizontal">
  46. <Button Content="|&lt;" Padding="10, 2" BorderBrush="Black" Margin="3, 0" Click="FirstPage"/>
  47. <Button Content="&lt;" Padding="10, 2" BorderBrush="Black" Margin="3, 0" Click="PriveusPage"/>
  48. <TextBox Name="pageNumTaxtBlock" Text="{Binding PageNum}" Width="30" Padding="4" TextAlignment="Center" Margin="3, 0"/>
  49. <Button Content="&gt;" Padding="10, 2" BorderBrush="Black" Margin="3, 0" Click="NextPage"/>
  50. <Button Content="&gt;|" Padding="10, 2" BorderBrush="Black" Margin="3, 0" Click="LastPage"/>
  51. <Button Margin="50, 0, 10, 0" Content="Download photos in current page" Padding="10, 2" BorderBrush="Black"
  52. Click="DownloadPageImages"/>
  53. </StackPanel>
  54. </Grid>
  55. </Window>