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.
Disable packager for CollectionView on UWP (xamarin#8404)
* Reproduce issue 8366 * Clean up old comments * Turn off packaging for the CollectionView on UWP Fixes xamarin#8366
- Loading branch information
1 parent
e640a19
commit 43b0607
Showing
4 changed files
with
102 additions
and
5 deletions.
There are no files selected for viewing
96 changes: 96 additions & 0 deletions
96
Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue8366.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,96 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
using Xamarin.Forms.CustomAttributes; | ||
using Xamarin.Forms.Internals; | ||
|
||
#if UITEST | ||
using Xamarin.Forms.Core.UITests; | ||
using Xamarin.UITest; | ||
using NUnit.Framework; | ||
#endif | ||
|
||
namespace Xamarin.Forms.Controls.Issues | ||
{ | ||
[Preserve(AllMembers = true)] | ||
[Issue(IssueTracker.Bugzilla, 8366, "[Bug] UWP CollectionView Floating Row and Toolbar clipped")] | ||
public class Issue8366 : TestMasterDetailPage | ||
{ | ||
NavigationPage _items; | ||
NavigationPage _other; | ||
|
||
protected override void Init() | ||
{ | ||
MasterBehavior = MasterBehavior.Split; | ||
|
||
_items = new NavigationPage(Items()); | ||
_other = new NavigationPage(Other()); | ||
|
||
Detail = _items; | ||
Master = MasterPage(); | ||
} | ||
|
||
ContentPage MasterPage() | ||
{ | ||
var page = new ContentPage(); | ||
|
||
var menu = new StackLayout(); | ||
|
||
var instructions = new Label { Margin = 3, Text = "Tap 'Other' to change the Detail page. " + | ||
"Then tap 'Items' to return to this page. " + | ||
"If the CollectionView does not show a garbled mess at the top, this test has passed." }; | ||
|
||
menu.Children.Add(instructions); | ||
|
||
var buttonItems = new Button { Text = "Items" }; | ||
var buttonOther = new Button { Text = "Other" }; | ||
|
||
page.Content = menu; | ||
|
||
buttonItems.Clicked += (sender, args) => { Detail = _items; }; | ||
buttonOther.Clicked += (sender, args) => { Detail = _other; }; | ||
|
||
menu.Children.Add(buttonItems); | ||
menu.Children.Add(buttonOther); | ||
|
||
page.Title = "8366 Master"; | ||
|
||
return page; | ||
} | ||
|
||
ContentPage Items() | ||
{ | ||
var page = new ContentPage | ||
{ | ||
Title = "Items" | ||
}; | ||
|
||
var cv = new CollectionView(); | ||
|
||
var items = new List<string>() { "uno", "dos", "tres" }; | ||
|
||
cv.ItemsSource = items; | ||
|
||
cv.ItemTemplate = new DataTemplate(() => { | ||
var root = new Label(); | ||
root.SetBinding(Label.TextProperty, new Binding(".")); | ||
return root; | ||
}); | ||
|
||
page.Content = cv; | ||
|
||
return page; | ||
} | ||
|
||
ContentPage Other() | ||
{ | ||
var page = new ContentPage | ||
{ | ||
Title = "Other", | ||
Content = new Label { Text = "Other page" } | ||
}; | ||
|
||
return page; | ||
} | ||
} | ||
} |
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
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