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.
Fix an issue clipping directly a Label (#12482)
- Loading branch information
1 parent
7dd033f
commit 930bb6c
Showing
4 changed files
with
74 additions
and
0 deletions.
There are no files selected for viewing
35 changes: 35 additions & 0 deletions
35
Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue12471.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,35 @@ | ||
<?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.Issue12471" | ||
Title="Issue 12471"> | ||
<StackLayout> | ||
<Label | ||
Padding="12" | ||
BackgroundColor="Black" | ||
TextColor="White" | ||
Text="If the Label below has a circular clip applied, the test has passed."/> | ||
<Grid> | ||
<Label | ||
Text="X" | ||
TextColor="White" | ||
FontSize="30" | ||
HeightRequest="60" | ||
WidthRequest="60" | ||
HorizontalOptions="Center" | ||
VerticalOptions="Center" | ||
VerticalTextAlignment="Center" | ||
HorizontalTextAlignment="Center" | ||
BackgroundColor="Red"> | ||
<Label.Clip> | ||
<EllipseGeometry | ||
Center="30,30" | ||
RadiusX="30" | ||
RadiusY="30"/> | ||
</Label.Clip> | ||
</Label> | ||
</Grid> | ||
</StackLayout> | ||
</controls:TestContentPage> |
28 changes: 28 additions & 0 deletions
28
Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue12471.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,28 @@ | ||
using Xamarin.Forms.CustomAttributes; | ||
using Xamarin.Forms.Internals; | ||
|
||
|
||
#if UITEST | ||
using Xamarin.Forms.Core.UITests; | ||
using NUnit.Framework; | ||
#endif | ||
|
||
namespace Xamarin.Forms.Controls.Issues | ||
{ | ||
[Preserve(AllMembers = true)] | ||
[Issue(IssueTracker.Github, 12471, "[Bug] Label.Clip won't clip on Android", PlatformAffected.Android)] | ||
public partial class Issue12471 : TestContentPage | ||
{ | ||
public Issue12471() | ||
{ | ||
#if APP | ||
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
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