-
Notifications
You must be signed in to change notification settings - Fork 762
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 #18389 from unoplatform/mergify/bp/release/stable/…
…5.4/pr-18369 fix: Do not destroy the singleton Window for single-window targets (backport #18369)
- Loading branch information
Showing
4 changed files
with
76 additions
and
7 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
src/SamplesApp/UITests.Shared/Microsoft_UI_Windowing/SingleWindowClose.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="UITests.Microsoft_UI_Windowing.SingleWindowClose" | ||
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:local="using:UITests.Microsoft_UI_Windowing" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:controls="using:Microsoft.UI.Xaml.Controls" | ||
x:DefaultBindMode="TwoWay" | ||
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}" | ||
mc:Ignorable="d"> | ||
|
||
<StackPanel Padding="8" Spacing="8"> | ||
<TextBlock Text="This sample is only relevant to Android and iOS." x:Name="LogTextBlock" /> | ||
</StackPanel> | ||
</Page> |
35 changes: 35 additions & 0 deletions
35
src/SamplesApp/UITests.Shared/Microsoft_UI_Windowing/SingleWindowClose.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,35 @@ | ||
using System; | ||
using System.Threading.Tasks; | ||
using Microsoft.UI.Windowing; | ||
using Microsoft.UI.Xaml; | ||
using Microsoft.UI.Xaml.Controls; | ||
using SamplesApp; | ||
using Uno.Disposables; | ||
using Uno.UI.Common; | ||
using Uno.UI.Samples.Controls; | ||
using Uno.UI.Samples.UITests.Helpers; | ||
using Windows.Graphics; | ||
|
||
#if !WINDOWS_UWP && !WINAPPSDK | ||
using Uno.UI.Xaml; | ||
using Uno.UI.Xaml.Controls; | ||
using WinUICoreServices = Uno.UI.Xaml.Core.CoreServices; | ||
#endif | ||
|
||
namespace UITests.Microsoft_UI_Windowing; | ||
|
||
[Sample( | ||
"Windowing", | ||
IsManualTest = true, | ||
Description = | ||
"- On Android and iOS, try to back out of this app to the main screen and reopen the app via its icon. " + | ||
"You should see the Samples app UI load normally - not a blank screen and the app should also not crash. \r\n" + | ||
"- On Android and iOS, try to back out of this app and then activate it by opening an URI like uno-samples-test:something. " + | ||
"You should see the Samples app UI load normally - not a blank screen and the app should also not crash. ")] | ||
public sealed partial class SingleWindowClose : Page | ||
{ | ||
public SingleWindowClose() | ||
{ | ||
this.InitializeComponent(); | ||
} | ||
} |
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
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