open picture fix

This commit is contained in:
iTob 2026-02-25 20:50:19 +01:00
parent 6740835be7
commit 857b06655f
2 changed files with 12 additions and 4 deletions

View File

@ -9,7 +9,15 @@
Background="Black">
<Grid>
<WrapPanel VerticalAlignment="Stretch" Background="Black" x:Name="PicturesPanel" Orientation="Horizontal" />
<ScrollViewer x:Name="GalleryScrollViewer" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled" Background="Black" CanContentScroll="False">
<ItemsControl x:Name="PicturesPanel" Background="Black">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel Orientation="Horizontal" />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
</ItemsControl>
</ScrollViewer>
<ContentPresenter x:Name="RootContentDialogPresenter" Grid.Row="0" />
</Grid>
</Page>

View File

@ -1,4 +1,4 @@
using System.Windows;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Media;
@ -84,7 +84,7 @@ public partial class PictureGalleryPage : Page
hyperlink.Inlines.Add(new InlineUIContainer(imageControl));
textBlock.Inlines.Add(hyperlink);
this.PicturesPanel.Children.Add(textBlock);
this.PicturesPanel.Items.Add(textBlock);
loop++;
}
while ((loop < howManyPictures || howManyPictures == 0) && loop < this._pictureGalleryService.ThumbnailsOrderedByNewestDescending.Count);
@ -125,7 +125,7 @@ public partial class PictureGalleryPage : Page
return;
}
string picturePath = picturePathUri.AbsolutePath;
string picturePath = Uri.UnescapeDataString(picturePathUri.AbsolutePath);
Application.Current.Dispatcher.BeginInvoke(
async () =>
{