Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

Commit

Permalink
Fixed the baby elephant rendering using brushes (changed default Stro…
Browse files Browse the repository at this point in the history
…keThickness) (#11574)

fixes #11547
fixes #11497
  • Loading branch information
jsuarezruiz committed Jul 28, 2020
1 parent 905d447 commit 5ab6f1d
Show file tree
Hide file tree
Showing 5 changed files with 83 additions and 1 deletion.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
using Xamarin.Forms.CustomAttributes;
using Xamarin.Forms.Internals;
using Xamarin.Forms.Xaml;
using System.Collections.Generic;

#if UITEST
using Xamarin.UITest;
using Xamarin.UITest.Queries;
using NUnit.Framework;
using Xamarin.Forms.Core.UITests;
#endif

namespace Xamarin.Forms.Controls.Issues
{
#if UITEST
[Category(UITestCategories.Brush)]
#endif
#if APP
[XamlCompilation(XamlCompilationOptions.Compile)]
#endif
[Preserve(AllMembers = true)]
[Issue(IssueTracker.Github, 11547, "[Bug] [Shapes 4.8-pre2] Justice for baby elephant!", PlatformAffected.Android | PlatformAffected.iOS)]
public partial class Issue11547 : TestContentPage
{
public Issue11547()
{
#if APP
Title = "Issue 11547";
Device.SetFlags(new List<string> { ExperimentalFlags.ShapesExperimental });
InitializeComponent();
#endif
}

protected override void Init()
{

}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -1463,6 +1463,7 @@
<Compile Include="$(MSBuildThisFileDirectory)Issue11291.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Issue11244.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Issue11272.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Issue11547.xaml.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Issue11247.cs" />
</ItemGroup>
<ItemGroup>
Expand Down Expand Up @@ -1727,6 +1728,9 @@
<EmbeddedResource Include="$(MSBuildThisFileDirectory)Issue11262.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
</EmbeddedResource>
<EmbeddedResource Include="$(MSBuildThisFileDirectory)Issue11547.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="$(MSBuildThisFileDirectory)Bugzilla27417Xaml.xaml">
Expand Down
1 change: 1 addition & 0 deletions Xamarin.Forms.Core.UITests.Shared/UITestCategories.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,6 @@ internal static class UITestCategories
public const string RadioButton = "RadioButton";
public const string Accessibility = "Accessibility";
public const string Shape = "Shape";
public const string Brush = "Brush";
}
}
2 changes: 1 addition & 1 deletion Xamarin.Forms.Core/Shapes/Shape.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public Shape()
BindableProperty.Create(nameof(Stroke), typeof(Brush), typeof(Shape), null);

public static readonly BindableProperty StrokeThicknessProperty =
BindableProperty.Create(nameof(StrokeThickness), typeof(double), typeof(Shape), 1.0);
BindableProperty.Create(nameof(StrokeThickness), typeof(double), typeof(Shape), 0.0);

public static readonly BindableProperty StrokeDashArrayProperty =
BindableProperty.Create(nameof(StrokeDashArray), typeof(DoubleCollection), typeof(Shape), null,
Expand Down

0 comments on commit 5ab6f1d

Please sign in to comment.