12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- <Window x:Class="NBAManagment.PhotosPage"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:local="clr-namespace:NBAManagment"
- mc:Ignorable="d"
- Title="PhotosPage" Height="450" Width="800">
- <Grid>
- <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."
- HorizontalAlignment="Center" Margin="10"
- FontSize="14px"/>
- <Border BorderThickness="1" Margin="10, 35, 10, 45">
- <ListView Name="imagesListView" ItemsSource="{Binding PagedPictures.Filtered}" ScrollViewer.HorizontalScrollBarVisibility="Disabled" Margin="-1,0,1,0">
- <ListView.ItemsPanel>
- <ItemsPanelTemplate>
- <WrapPanel ItemHeight="180" ItemWidth="250"
- Width="{Binding Path=ActualWidth, ElementName=imagesListView}"
- Orientation="Horizontal"/>
- </ItemsPanelTemplate>
- </ListView.ItemsPanel>
- <ListView.ItemTemplate>
- <DataTemplate>
- <Grid>
- <Button Margin="5" PreviewMouseRightButtonDown="ShowDownloadPoput">
- <Image Source="{Binding Img}" Stretch="Fill"/>
- </Button>
- </Grid>
- </DataTemplate>
- </ListView.ItemTemplate>
- </ListView>
- </Border>
- <Popup x:Name="downloadPoput" Width="125" Height="30" IsOpen="False" Placement="Mouse" PopupAnimation="None" StaysOpen="False">
- <Grid>
- <Button Click="DownloadImage" Margin="0">
- <Button.Content>
- <StackPanel Orientation="Horizontal">
- <Image Source="/NBAManagement;component/Resources/download.png" Height="25" Width="25"/>
- <TextBlock Text="Download" FontSize="16px"/>
- </StackPanel>
- </Button.Content>
- </Button>
- </Grid>
- </Popup>
- <StackPanel VerticalAlignment="Bottom" Margin="10" Orientation="Horizontal">
- <TextBlock Text="Total " Foreground="Black" FontSize="18px" FontWeight="Bold" FontStyle="Italic" />
- <TextBlock Text="{Binding PagedPictures.CurrentPageItemCount}" Foreground="Black" FontSize="18px" FontWeight="Bold" FontStyle="Italic" />
- <TextBlock Text=" Photos, " Foreground="Black" FontSize="18px" FontWeight="Bold" FontStyle="Italic" />
- <TextBlock Text="{Binding PagedPictures.ItemCount}" Foreground="Black" FontSize="18px" FontWeight="Bold" FontStyle="Italic" />
- <TextBlock Text=" Photos in one page, Total " Foreground="Black" FontSize="18px" FontWeight="Bold" FontStyle="Italic" />
- <TextBlock Text="{Binding PagedPictures.PageCount}" Foreground="Black" FontSize="18px" FontWeight="Bold" FontStyle="Italic" />
- <TextBlock Text=" Pages" Foreground="Black" FontSize="18px" FontWeight="Bold" FontStyle="Italic" />
- </StackPanel>
- <StackPanel VerticalAlignment="Bottom" HorizontalAlignment="Right" Margin="10" Orientation="Horizontal">
- <Button Content="|<" Padding="10, 2" BorderBrush="Black" Margin="3, 0" Click="FirstPage"/>
- <Button Content="<" Padding="10, 2" BorderBrush="Black" Margin="3, 0" Click="PriveusPage"/>
- <TextBox Name="pageNumTaxtBlock" Text="{Binding PageNum}" Width="30" Padding="4" TextAlignment="Center" Margin="3, 0"/>
- <Button Content=">" Padding="10, 2" BorderBrush="Black" Margin="3, 0" Click="NextPage"/>
- <Button Content=">|" Padding="10, 2" BorderBrush="Black" Margin="3, 0" Click="LastPage"/>
- <Button Margin="50, 0, 10, 0" Content="Download photos in current page" Padding="10, 2" BorderBrush="Black"
- Click="DownloadPageImages"/>
- </StackPanel>
- </Grid>
- </Window>
|