forked from xamarin/Xamarin.Forms
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added test in controls gallery for issue xamarin#13258
- Loading branch information
1 parent
51ca97b
commit 3c23c60
Showing
3 changed files
with
106 additions
and
0 deletions.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue13258.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,14 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<controls:TestContentPage | ||
xmlns:controls="clr-namespace:Xamarin.Forms.Controls" | ||
xmlns="http://xamarin.com/schemas/2014/forms" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | ||
x:Class="Xamarin.Forms.Controls.Issues.Issue13258" | ||
Title="Issue 13258"> | ||
|
||
<StackLayout> | ||
<Button Text="PushModal" Clicked="PushModal_Clicked" /> | ||
<Button Text="PushModal with BackgroundColor" Clicked="PushModalWithBackground_Clicked" /> | ||
</StackLayout> | ||
|
||
</controls:TestContentPage> |
85 changes: 85 additions & 0 deletions
85
Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue13258.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,85 @@ | ||
using Xamarin.Forms.CustomAttributes; | ||
using Xamarin.Forms.Internals; | ||
|
||
namespace Xamarin.Forms.Controls.Issues | ||
{ | ||
[Preserve(AllMembers = true)] | ||
[Issue(IssueTracker.Github, 13258, "[Bug] After PopModalAsync will not call OnAppearing (iOS)", PlatformAffected.iOS)] | ||
public partial class Issue13258 : TestContentPage | ||
{ | ||
public Issue13258() | ||
{ | ||
#if APP | ||
InitializeComponent(); | ||
#endif | ||
} | ||
|
||
protected override void Init() | ||
{ | ||
|
||
} | ||
|
||
void PushModal_Clicked(System.Object sender, System.EventArgs e) | ||
{ | ||
Navigation.PushModalAsync(new Issue13258_ModalPage()); | ||
} | ||
|
||
void PushModalWithBackground_Clicked(System.Object sender, System.EventArgs e) | ||
{ | ||
Navigation.PushModalAsync(new Issue13258_ModalPage() | ||
{ | ||
BackgroundColor = Color.Red, | ||
}); | ||
} | ||
|
||
protected override void OnAppearing() | ||
{ | ||
System.Diagnostics.Debug.WriteLine("Issue13258 OnAppearing"); | ||
base.OnAppearing(); | ||
} | ||
|
||
protected override void OnDisappearing() | ||
{ | ||
System.Diagnostics.Debug.WriteLine("Issue13258 OnDisappearing"); | ||
base.OnDisappearing(); | ||
} | ||
|
||
public class Issue13258_ModalPage : ContentPage | ||
{ | ||
public Issue13258_ModalPage() | ||
{ | ||
Title = "Issue13258 ModalPage"; | ||
|
||
var stackLayout = new StackLayout() | ||
{ | ||
VerticalOptions = LayoutOptions.Center, | ||
}; | ||
|
||
var button = new Button() | ||
{ | ||
Text = "PopModal", | ||
VerticalOptions = LayoutOptions.Center, | ||
}; | ||
button.Clicked += (sender, e) => { | ||
Navigation.PopModalAsync(); | ||
}; | ||
|
||
stackLayout.Children.Add(button); | ||
|
||
Content = stackLayout; | ||
} | ||
|
||
protected override void OnAppearing() | ||
{ | ||
System.Diagnostics.Debug.WriteLine("Issue13258_ModalPage OnAppearing"); | ||
base.OnAppearing(); | ||
} | ||
|
||
protected override void OnDisappearing() | ||
{ | ||
System.Diagnostics.Debug.WriteLine("Issue13258_ModalPage OnDisappearing"); | ||
base.OnDisappearing(); | ||
} | ||
} | ||
} | ||
} |
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