This repository has been archived by the owner on May 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
71 changed files
with
2,131 additions
and
500 deletions.
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue10679.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,34 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<local:TestShell xmlns="http://xamarin.com/schemas/2014/forms" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | ||
xmlns:d="http://xamarin.com/schemas/2014/forms/design" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
mc:Ignorable="d" | ||
xmlns:local="using:Xamarin.Forms.Controls" | ||
xmlns:issues="using:Xamarin.Forms.Controls.Issues" | ||
x:Class="Xamarin.Forms.Controls.Issues.Issue10679"> | ||
<Shell.Resources> | ||
<ResourceDictionary> | ||
|
||
<Color x:Key="NavigationPrimary">#2196F3</Color> | ||
|
||
<Style x:Key="BaseStyle" | ||
TargetType="Element"> | ||
<Setter Property="Shell.BackgroundColor" Value="{StaticResource NavigationPrimary}" /> | ||
<Setter Property="Shell.ForegroundColor" Value="White" /> | ||
<Setter Property="Shell.TitleColor" Value="White" /> | ||
<Setter Property="Shell.DisabledColor" Value="#B4FFFFFF" /> | ||
<Setter Property="Shell.UnselectedColor" Value="#95FFFFFF" /> | ||
<Setter Property="Shell.TabBarBackgroundColor" Value="{StaticResource NavigationPrimary}" /> | ||
<Setter Property="Shell.TabBarForegroundColor" Value="White" /> | ||
<Setter Property="Shell.TabBarUnselectedColor" Value="#95FFFFFF" /> | ||
<Setter Property="Shell.TabBarTitleColor" Value="White" /> | ||
</Style> | ||
|
||
<Style BasedOn="{StaticResource BaseStyle}" | ||
TargetType="TabBar" /> | ||
|
||
</ResourceDictionary> | ||
</Shell.Resources> | ||
<ShellContent ContentTemplate="{DataTemplate issues:FirstIssue10679Page}" /> | ||
</local:TestShell> |
148 changes: 148 additions & 0 deletions
148
Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue10679.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,148 @@ | ||
using System.Collections.Generic; | ||
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.Github, 10679, "SwipeView crash with NullReferenceException", | ||
PlatformAffected.Android)] | ||
public partial class Issue10679 : TestShell | ||
{ | ||
public Issue10679() | ||
{ | ||
#if APP | ||
Device.SetFlags(new List<string>(Device.Flags ?? new List<string>()) { "SwipeView_Experimental" }); | ||
InitializeComponent(); | ||
#endif | ||
} | ||
|
||
protected override void Init() | ||
{ | ||
|
||
} | ||
} | ||
|
||
[Preserve(AllMembers = true)] | ||
public class FirstIssue10679Page : ContentPage | ||
{ | ||
public FirstIssue10679Page() | ||
{ | ||
Title = "Issue 10679"; | ||
|
||
var layout = new Grid(); | ||
|
||
var button = new Button | ||
{ | ||
VerticalOptions = LayoutOptions.Center, | ||
Text = "Go to Next Page" | ||
}; | ||
|
||
layout.Children.Add(button); | ||
|
||
Content = layout; | ||
|
||
button.Clicked += async (sender, args) => | ||
{ | ||
await Shell.Current.Navigation.PushAsync(new SecondIssue10679Page()).ConfigureAwait(false); | ||
}; | ||
} | ||
} | ||
|
||
[Preserve(AllMembers = true)] | ||
public class SecondIssue10679Page : ContentPage | ||
{ | ||
public SecondIssue10679Page() | ||
{ | ||
var layout = new Grid(); | ||
|
||
var swipeView = new SwipeView(); | ||
|
||
var leftItem = new SwipeItem | ||
{ | ||
BackgroundColor = Color.Red | ||
}; | ||
|
||
var leftItems = new SwipeItems | ||
{ | ||
Mode = SwipeMode.Execute, | ||
SwipeBehaviorOnInvoked = SwipeBehaviorOnInvoked.Close | ||
}; | ||
|
||
leftItems.Add(leftItem); | ||
|
||
var rightItem = new SwipeItem | ||
{ | ||
BackgroundColor = Color.Green | ||
}; | ||
|
||
var rightItems = new SwipeItems | ||
{ | ||
Mode = SwipeMode.Execute, | ||
SwipeBehaviorOnInvoked = SwipeBehaviorOnInvoked.Close | ||
}; | ||
|
||
rightItems.Add(rightItem); | ||
|
||
var content = new Grid | ||
{ | ||
BackgroundColor = Color.White | ||
}; | ||
|
||
var contentLabel = new Label | ||
{ | ||
HorizontalOptions = LayoutOptions.Center, | ||
VerticalOptions = LayoutOptions.Center, | ||
Text = "Swipe Left or Right" | ||
}; | ||
|
||
content.Children.Add(contentLabel); | ||
|
||
swipeView.Content = content; | ||
swipeView.LeftItems = leftItems; | ||
swipeView.RightItems = rightItems; | ||
|
||
layout.Children.Add(swipeView); | ||
|
||
Content = layout; | ||
|
||
leftItem.Invoked += async (sender, args) => | ||
{ | ||
Shell.Current.Navigation.InsertPageBefore(new ThirdIssue10679Page(), this); | ||
_ = await Shell.Current.Navigation.PopAsync(false); | ||
}; | ||
|
||
rightItem.Invoked += async (sender, args) => | ||
{ | ||
Shell.Current.Navigation.InsertPageBefore(new ThirdIssue10679Page(), this); | ||
_ = await Shell.Current.Navigation.PopAsync(false); | ||
}; | ||
} | ||
} | ||
|
||
[Preserve(AllMembers = true)] | ||
public class ThirdIssue10679Page : ContentPage | ||
{ | ||
public ThirdIssue10679Page() | ||
{ | ||
var layout = new StackLayout(); | ||
|
||
var infoLabel = new Label | ||
{ | ||
HorizontalOptions = LayoutOptions.Center, | ||
VerticalOptions = LayoutOptions.Center, | ||
Text = "Without NullReferenceException, the test has passed." | ||
}; | ||
|
||
layout.Children.Add(infoLabel); | ||
|
||
Content = layout; | ||
} | ||
} | ||
} |
52 changes: 52 additions & 0 deletions
52
Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue11190.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,52 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<controls:TestContentPage | ||
xmlns="http://xamarin.com/schemas/2014/forms" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | ||
xmlns:controls="clr-namespace:Xamarin.Forms.Controls" | ||
x:Class="Xamarin.Forms.Controls.Issues.Issue11190" | ||
Title="Issue 11190"> | ||
<Grid> | ||
<Grid.RowDefinitions> | ||
<RowDefinition Height="Auto" /> | ||
<RowDefinition Height="*" /> | ||
</Grid.RowDefinitions> | ||
<Label | ||
Padding="12" | ||
BackgroundColor="Black" | ||
TextColor="White" | ||
Text="If the Shape is rendered without problems or exceptions, the test has passed."/> | ||
<Grid | ||
Grid.Row="1" | ||
HorizontalOptions="Start" | ||
VerticalOptions="Start" | ||
HeightRequest="200" | ||
WidthRequest="200"> | ||
<Path | ||
Stroke="Black" | ||
HeightRequest="200" | ||
WidthRequest="200"> | ||
<Path.Data> | ||
<PathGeometry> | ||
<PathGeometry.Figures> | ||
<PathFigureCollection> | ||
<PathFigure | ||
StartPoint="0,0"> | ||
<PathFigure.Segments> | ||
<PathSegmentCollection> | ||
<ArcSegment | ||
Size="100,100" | ||
RotationAngle="45" | ||
IsLargeArc="True" | ||
SweepDirection="CounterClockwise" | ||
Point="100,100" /> | ||
</PathSegmentCollection> | ||
</PathFigure.Segments> | ||
</PathFigure> | ||
</PathFigureCollection> | ||
</PathGeometry.Figures> | ||
</PathGeometry> | ||
</Path.Data> | ||
</Path> | ||
</Grid> | ||
</Grid> | ||
</controls:TestContentPage> |
37 changes: 37 additions & 0 deletions
37
Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue11190.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,37 @@ | ||
using Xamarin.Forms.CustomAttributes; | ||
using Xamarin.Forms.Internals; | ||
using System.Collections.Generic; | ||
|
||
#if UITEST && __ANDROID__ | ||
using Xamarin.UITest; | ||
using Xamarin.UITest.Queries; | ||
using NUnit.Framework; | ||
using Xamarin.Forms.Core.UITests; | ||
using System.Linq; | ||
#endif | ||
|
||
namespace Xamarin.Forms.Controls.Issues | ||
{ | ||
#if UITEST && __ANDROID__ | ||
[Category(UITestCategories.Shape)] | ||
#endif | ||
[Preserve(AllMembers = true)] | ||
[Issue(IssueTracker.Github, 11190, "[Bug] Shapes: ArcSegment throwing on iOS, doing nothing on Android", PlatformAffected.Android | PlatformAffected.iOS)] | ||
public partial class Issue11190 : TestContentPage | ||
{ | ||
|
||
public Issue11190() | ||
{ | ||
#if APP | ||
Device.SetFlags(new List<string> { ExperimentalFlags.ShapesExperimental }); | ||
InitializeComponent(); | ||
#endif | ||
} | ||
|
||
|
||
protected override void Init() | ||
{ | ||
|
||
} | ||
} | ||
} |
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
45 changes: 45 additions & 0 deletions
45
Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue11653.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,45 @@ | ||
<?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.Issue11653" | ||
Title="Issue 11653"> | ||
<ContentPage.Content> | ||
<StackLayout> | ||
<Label | ||
Padding="12" | ||
BackgroundColor="Black" | ||
TextColor="White"> | ||
<Label.FormattedText> | ||
<FormattedString> | ||
<Span | ||
Text="Without exceptions, the test has passed."/> | ||
<Span | ||
Text="NOTE: Nothing will render."/> | ||
</FormattedString> | ||
</Label.FormattedText> | ||
</Label> | ||
<Path Aspect="Uniform"> | ||
<Path.Data> | ||
<PathGeometry> | ||
<PathGeometry.Figures> | ||
<PathFigureCollection> | ||
<PathFigure | ||
IsClosed="True" | ||
StartPoint="10,100"> | ||
<PathFigure.Segments> | ||
<PathSegmentCollection> | ||
<PolyBezierSegment | ||
Points="100, 100" /> | ||
</PathSegmentCollection> | ||
</PathFigure.Segments> | ||
</PathFigure> | ||
</PathFigureCollection> | ||
</PathGeometry.Figures> | ||
</PathGeometry> | ||
</Path.Data> | ||
</Path> | ||
</StackLayout> | ||
</ContentPage.Content> | ||
</controls:TestContentPage> |
36 changes: 36 additions & 0 deletions
36
Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue11653.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,36 @@ | ||
using Xamarin.Forms.Internals; | ||
using Xamarin.Forms.CustomAttributes; | ||
using Xamarin.Forms.Shapes; | ||
using System.Collections.Generic; | ||
|
||
#if UITEST | ||
using Xamarin.UITest; | ||
using NUnit.Framework; | ||
using Xamarin.Forms.Core.UITests; | ||
#endif | ||
|
||
namespace Xamarin.Forms.Controls.Issues | ||
{ | ||
#if UITEST | ||
[Category(UITestCategories.Shape)] | ||
#endif | ||
[Preserve(AllMembers = true)] | ||
[Issue(IssueTracker.Github, 11653, | ||
"[Bug] Polygon.Points doesn't respond to CollectionChanged events", | ||
PlatformAffected.All)] | ||
public partial class Issue11653 : TestContentPage | ||
{ | ||
public Issue11653() | ||
{ | ||
#if APP | ||
Device.SetFlags(new List<string> { ExperimentalFlags.BrushExperimental, ExperimentalFlags.ShapesExperimental }); | ||
InitializeComponent(); | ||
#endif | ||
} | ||
|
||
protected override void Init() | ||
{ | ||
|
||
} | ||
} | ||
} |
Oops, something went wrong.