diff options
author | Paul DiPietro <pauldipietro@users.noreply.github.com> | 2017-03-06 23:45:21 -0600 |
---|---|---|
committer | Samantha Houts <samantha@teamredwall.com> | 2017-03-06 21:45:21 -0800 |
commit | 93fc5532236f22e944a00aea0962bb4e3ab2dc9b (patch) | |
tree | bd0a3fa988985f56a8097d04845c671962f6bdfd /Xamarin.Forms.Controls.Issues | |
parent | 65d848051912e1522d692ba647945625f271b23c (diff) | |
download | xamarin-forms-93fc5532236f22e944a00aea0962bb4e3ab2dc9b.tar.gz xamarin-forms-93fc5532236f22e944a00aea0962bb4e3ab2dc9b.tar.bz2 xamarin-forms-93fc5532236f22e944a00aea0962bb4e3ab2dc9b.zip |
[UWP] Add width check for Detail on MDP to prevent potential crash (#775)
Diffstat (limited to 'Xamarin.Forms.Controls.Issues')
2 files changed, 67 insertions, 0 deletions
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla43519.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla43519.cs new file mode 100644 index 00000000..43f1d84f --- /dev/null +++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla43519.cs @@ -0,0 +1,66 @@ +using Xamarin.Forms.CustomAttributes; +using Xamarin.Forms.Internals; + +#if UITEST +using Xamarin.UITest; +using NUnit.Framework; +#endif + +namespace Xamarin.Forms.Controls.Issues +{ + [Preserve(AllMembers = true)] + [Issue(IssueTracker.Bugzilla, 43519, "[UWP] MasterDetail page ArguementException when nested in a TabbedPage and returning from modal page", PlatformAffected.UWP)] + public class Bugzilla43519 : TestTabbedPage + { + protected override void Init() + { + var modalPage = new ContentPage + { + Title = "ModalPage", + Content = new StackLayout + { + Children = + { + new Button + { + Command = new Command(() => Navigation.PopModalAsync()), + Text = "Pop modal page -- should not crash on UWP" + } + } + } + }; + + var mdp = new MasterDetailPage + { + Title = "Page 1", + Master = new ContentPage + { + Title = "Master", + Content = new StackLayout() + }, + Detail = new ContentPage + { + Title = "Detail", + Content = new StackLayout() + } + }; + + Children.Add(mdp); + Children.Add(new ContentPage + { + Title = "Page 2", + Content = new StackLayout + { + Children = + { + new Button + { + Command = new Command(() => Navigation.PushModalAsync(modalPage)), + Text = "Click to display modal" + } + } + } + }); + } + } +}
\ No newline at end of file diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems index 28763194..99f2bf81 100644 --- a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems +++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems @@ -146,6 +146,7 @@ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla43313.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Bugzilla43469.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Bugzilla43516.cs" /> + <Compile Include="$(MSBuildThisFileDirectory)Bugzilla43519.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Bugzilla43527.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Bugzilla44047.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Bugzilla43941.cs" /> |