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
292 changed files
with
8,616 additions
and
1,050 deletions.
There are no files selected for viewing
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
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
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
85 changes: 85 additions & 0 deletions
85
Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue11050.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,85 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ContentPage | ||
xmlns="http://xamarin.com/schemas/2014/forms" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | ||
x:Class="Xamarin.Forms.Controls.Issues.Issue11050" | ||
Title="Issue 11050"> | ||
<ContentPage.Resources> | ||
<ResourceDictionary> | ||
|
||
<Style TargetType="Path"> | ||
<Setter Property="Stroke" Value="Black" /> | ||
<Setter Property="StrokeThickness" Value="2" /> | ||
<Setter Property="Fill" Value="White" /> | ||
</Style> | ||
|
||
</ResourceDictionary> | ||
</ContentPage.Resources> | ||
<Grid BackgroundColor="Red" | ||
x:Name="grid" | ||
WidthRequest="200" | ||
HeightRequest="200" | ||
HorizontalOptions="Start" | ||
VerticalOptions="Start"> | ||
<!-- Small tick marks --> | ||
<Path | ||
WidthRequest="200" | ||
HeightRequest="200" | ||
Fill="{x:Null}" | ||
StrokeThickness="3" | ||
StrokeDashArray="0.1 3.04159"> | ||
<Path.Data> | ||
<EllipseGeometry | ||
RadiusX="90" | ||
RadiusY="90" /> | ||
</Path.Data> | ||
</Path> | ||
<!-- Long tick marks --> | ||
<Path | ||
StrokeThickness="6" | ||
StrokeDashArray="0.1 7.754"> | ||
<Path.Data> | ||
<EllipseGeometry | ||
RadiusX="90" | ||
RadiusY="90" /> | ||
</Path.Data> | ||
</Path> | ||
<!-- Hour hand pointing straight up --> | ||
<Path> | ||
<Path.Data> | ||
<PathGeometry | ||
Figures="M 0 -60 C 0 -30, 20 -30, 5 -20 L 5 0 | ||
C 5 7.5, -5 7.5, -5 0 L -5 -20 | ||
C -20 -30, 0 -30, 0 -60" /> | ||
</Path.Data> | ||
<Path.RenderTransform> | ||
<RotateTransform | ||
x:Name="hourHand"/> | ||
</Path.RenderTransform> | ||
</Path> | ||
<!-- Minute hand pointing straight up --> | ||
<Path> | ||
<Path.Data> | ||
<PathGeometry | ||
Figures="M 0 -80 C 0 -75, 0 -70, 2.5 -60 L 2.5 0 | ||
C 2.5 5, -2.5 5, -2.5 0 L -2.55 -60 | ||
C 0 -70, 0 -75, 0 -80" /> | ||
</Path.Data> | ||
<Path.RenderTransform> | ||
<RotateTransform | ||
x:Name="minuteHand" /> | ||
</Path.RenderTransform> | ||
</Path> | ||
<!-- Second hand pointing straight up --> | ||
<Path> | ||
<Path.Data> | ||
<PathGeometry | ||
Figures="M 0 10 L 0 -80" /> | ||
</Path.Data> | ||
<Path.RenderTransform> | ||
<RotateTransform | ||
x:Name="secondHand"/> | ||
</Path.RenderTransform> | ||
</Path> | ||
</Grid> | ||
</ContentPage> |
47 changes: 47 additions & 0 deletions
47
Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue11050.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,47 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using Xamarin.Forms.CustomAttributes; | ||
using Xamarin.Forms.Internals; | ||
|
||
#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, 11050, "[Bug][iOS][Android] Shapes: clock drawing erro", PlatformAffected.Android | PlatformAffected.iOS)] | ||
public partial class Issue11050 : ContentPage | ||
{ | ||
public Issue11050() | ||
{ | ||
#if APP | ||
Device.SetFlags(new List<string> { ExperimentalFlags.ShapesExperimental }); | ||
|
||
InitializeComponent(); | ||
|
||
Device.StartTimer(TimeSpan.FromMilliseconds(15), () => | ||
{ | ||
DateTime dateTime = DateTime.Now; | ||
secondHand.Angle = 6 * (dateTime.Second + dateTime.Millisecond / 1000.0); | ||
minuteHand.Angle = 6 * dateTime.Minute + secondHand.Angle / 60; | ||
hourHand.Angle = 30 * (dateTime.Hour % 12) + minuteHand.Angle / 12; | ||
return true; | ||
}); | ||
|
||
SizeChanged += (sender, args) => | ||
{ | ||
grid.AnchorX = 0; | ||
grid.AnchorY = 0; | ||
grid.Scale = Math.Min(Width, Height) / 200; | ||
}; | ||
#endif | ||
} | ||
} | ||
} |
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
Oops, something went wrong.