-
Notifications
You must be signed in to change notification settings - Fork 742
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18738 from ajpinedam/dev/ajpm/ios.image.test
test: Image inside scroll manual test
- Loading branch information
Showing
3 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
...esApp/UITests.Shared/Windows_UI_Xaml_Controls/ImageTests/Image_ScrollView_ChangeView.xaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<Page | ||
x:Class="Uno.UI.Samples.UITests.ImageTests.Image_ScrollView_ChangeView" | ||
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="using:Uno.UI.Samples.UITests.ImageTests" | ||
mc:Ignorable="d"> | ||
|
||
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> | ||
<ScrollViewer ZoomMode="Enabled" x:Name="scrollViewer"> | ||
<Image Source="https://images.pexels.com/photos/3651611/pexels-photo-3651611.jpeg" | ||
ImageOpened="Image_OnImageOpened"/> | ||
</ScrollViewer> | ||
</Grid> | ||
</Page> |
26 changes: 26 additions & 0 deletions
26
...pp/UITests.Shared/Windows_UI_Xaml_Controls/ImageTests/Image_ScrollView_ChangeView.xaml.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using System.Collections.Generic; | ||
using System.ComponentModel; | ||
using System.Linq; | ||
using System.Runtime.CompilerServices; | ||
using Uno.UI.Samples.Controls; | ||
using Microsoft.UI.Xaml; | ||
using Microsoft.UI.Xaml.Controls; | ||
|
||
namespace Uno.UI.Samples.UITests.ImageTests | ||
{ | ||
[Sample("Image", | ||
IsManualTest = true, | ||
Description = "The sample showcases an image inside an scrollviewer. When the image is loaded, the scrollviewer changes its zoom factor.")] | ||
public sealed partial class Image_ScrollView_ChangeView : Page | ||
{ | ||
public Image_ScrollView_ChangeView() | ||
{ | ||
this.InitializeComponent(); | ||
} | ||
|
||
private void Image_OnImageOpened(object sender, RoutedEventArgs e) | ||
{ | ||
scrollViewer.ChangeView(0, 0, 0.5f); | ||
} | ||
} | ||
} |