Made improvements on loading photos
This commit is contained in:
@@ -14,6 +14,10 @@
|
||||
Title="Photos"
|
||||
DragDrop.AllowDrop="True"
|
||||
DragDrop.Drop="DropHandler"
|
||||
ExtendClientAreaChromeHints="NoChrome"
|
||||
TransparencyLevelHint="AcrylicBlur"
|
||||
Background="Transparent"
|
||||
ExtendClientAreaToDecorationsHint="True"
|
||||
>
|
||||
|
||||
<Design.DataContext>
|
||||
@@ -27,30 +31,36 @@
|
||||
<Button Content="Open Directory" Command="{Binding OpenDirectory}"/>
|
||||
</Menu>
|
||||
<ScrollViewer Grid.Column="1">
|
||||
<ItemsControl ItemsSource="{Binding Photos}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<WrapPanel ScrollViewer.VerticalScrollBarVisibility="Auto"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<ItemsRepeater ItemsSource="{Binding Photos}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
||||
<ItemsRepeater.Layout>
|
||||
<UniformGridLayout MinItemWidth="190"
|
||||
MinItemHeight="240"
|
||||
MinRowSpacing="12"
|
||||
MinColumnSpacing="12" />
|
||||
</ItemsRepeater.Layout>
|
||||
|
||||
<ItemsRepeater.ItemTemplate>
|
||||
<DataTemplate DataType="models:Photo">
|
||||
<StackPanel Orientation="Vertical" Margin="20">
|
||||
<StackPanel Orientation="Vertical" Margin="12">
|
||||
<i:Interaction.Behaviors>
|
||||
<ic:EventTriggerBehavior EventName="PointerReleased">
|
||||
<ic:InvokeCommandAction Command="{Binding DataContext.PhotoClicked, ElementName=Root}" PassEventArgsToCommand="True"/>
|
||||
</ic:EventTriggerBehavior>
|
||||
</i:Interaction.Behaviors>
|
||||
<Image Source="{Binding Source}" Width="150" Height="150"/>
|
||||
<TextBlock Text="{Binding DisplayName}" HorizontalAlignment="Center" Width="150"/>
|
||||
<Image Source="{Binding PreviewImage}"
|
||||
Width="150"
|
||||
Height="150" />
|
||||
<TextBlock Text="{Binding DisplayName}"
|
||||
HorizontalAlignment="Center"
|
||||
Width="150" />
|
||||
<TextBlock Text="{Binding DisplayPath}" HorizontalAlignment="Center" Width="150"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</ItemsRepeater.ItemTemplate>
|
||||
</ItemsRepeater>
|
||||
</ScrollViewer>
|
||||
<Grid Grid.Column="0" Grid.ColumnSpan="2" IsEnabled="{Binding SelectedPhoto}">
|
||||
<Image Source="{Binding SelectedPhoto.Source}" Margin="50">
|
||||
<Image Source="{Binding SelectedPhoto.FullImage}" Margin="50">
|
||||
<i:Interaction.Behaviors>
|
||||
<ic:EventTriggerBehavior EventName="PointerReleased">
|
||||
<ic:InvokeCommandAction Command="{Binding Path=SelectedPhotoClicked}"/>
|
||||
|
||||
Reference in New Issue
Block a user