Skip to content

Commit 9c1dcdf

Browse files
Fix issues with ImageEx Lazy Loading Sample
Can now use the sample button as a toggle. Close button is now visible. Made grid taller so sample is more apparent on high resolution monitors.
1 parent 628d1d5 commit 9c1dcdf

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

Microsoft.Toolkit.Uwp.SampleApp/SamplePages/ImageEx/ImageExLazyLoadingControl.xaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<Grid Margin="40"
1212
Background="White">
1313
<ScrollViewer VerticalScrollBarVisibility="Auto">
14-
<Grid Height="3000">
14+
<Grid Height="6000">
1515
<Border Width="200"
1616
Height="200"
1717
HorizontalAlignment="Center"
@@ -35,7 +35,8 @@
3535
VerticalAlignment="Top"
3636
Background="Transparent"
3737
BorderThickness="0"
38-
Click="CloseButton_Click">
38+
Click="CloseButton_Click"
39+
Foreground="Black">
3940
<SymbolIcon Symbol="Cancel" />
4041
</Button>
4142
</Grid>

Microsoft.Toolkit.Uwp.SampleApp/SamplePages/ImageEx/ImageExPage.xaml.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,15 @@ private async void Load()
8282

8383
if (lazyLoadingControlHost != null)
8484
{
85-
lazyLoadingControlHost.Child = imageExLazyLoadingControl;
85+
// Allow this to act as a toggle.
86+
if (lazyLoadingControlHost.Child == null)
87+
{
88+
lazyLoadingControlHost.Child = imageExLazyLoadingControl;
89+
}
90+
else
91+
{
92+
lazyLoadingControlHost.Child = null;
93+
}
8694
}
8795
});
8896

0 commit comments

Comments
 (0)