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

[iOS] Remove usage of System.Drawing types #14571

Merged
merged 1 commit into from
Sep 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Xamarin.Forms.Platform.iOS/Cells/SwitchCellRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using System.Drawing;
using Foundation;
using UIKit;
using RectangleF = CoreGraphics.CGRect;

namespace Xamarin.Forms.Platform.iOS
{
Expand Down
1 change: 1 addition & 0 deletions Xamarin.Forms.Platform.iOS/Extensions/LabelExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using System.Collections.Generic;
using System.Drawing;
using Xamarin.Forms.Internals;
using SizeF = CoreGraphics.CGSize;
#if __MOBILE__
using UIKit;
using NativeLabel = UIKit.UILabel;
Expand Down
1 change: 1 addition & 0 deletions Xamarin.Forms.Platform.iOS/Extensions/UIViewExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System.Linq;
using static System.String;
using Xamarin.Forms.Internals;
using SizeF = CoreGraphics.CGSize;
#if __MOBILE__
using UIKit;
namespace Xamarin.Forms.Platform.iOS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.ComponentModel;
using System.Drawing;
using UIKit;
using RectangleF = CoreGraphics.CGRect;

namespace Xamarin.Forms.Platform.iOS
{
Expand Down
1 change: 1 addition & 0 deletions Xamarin.Forms.Platform.iOS/Renderers/EntryRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using UIKit;
using Xamarin.Forms.PlatformConfiguration.iOSSpecific;
using Specifics = Xamarin.Forms.PlatformConfiguration.iOSSpecific.Entry;
using RectangleF = CoreGraphics.CGRect;

namespace Xamarin.Forms.Platform.iOS
{
Expand Down
1 change: 1 addition & 0 deletions Xamarin.Forms.Platform.iOS/Renderers/FrameRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Drawing;
using CoreGraphics;
using UIKit;
using SizeF = CoreGraphics.CGSize;

namespace Xamarin.Forms.Platform.iOS
{
Expand Down
1 change: 1 addition & 0 deletions Xamarin.Forms.Platform.iOS/Renderers/SearchBarRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using Foundation;
using UIKit;
using Xamarin.Forms.PlatformConfiguration.iOSSpecific;
using RectangleF = CoreGraphics.CGRect;

namespace Xamarin.Forms.Platform.iOS
{
Expand Down
2 changes: 1 addition & 1 deletion Xamarin.Forms.Platform.iOS/Renderers/SliderRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ void UpdateTapRecognizer()
if (control != null)
{
var tappedLocation = recognizer.LocationInView(control);
if (tappedLocation != null)
if (tappedLocation != default)
{
var val = (tappedLocation.X - control.Frame.X) * control.MaxValue / control.Frame.Size.Width;
Element.SetValueFromRenderer(Slider.ValueProperty, val);
Expand Down
1 change: 1 addition & 0 deletions Xamarin.Forms.Platform.iOS/Renderers/StepperRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Drawing;
using System.ComponentModel;
using UIKit;
using RectangleF = CoreGraphics.CGRect;

namespace Xamarin.Forms.Platform.iOS
{
Expand Down
1 change: 1 addition & 0 deletions Xamarin.Forms.Platform.iOS/Renderers/SwitchRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.ComponentModel;
using System.Drawing;
using UIKit;
using RectangleF = CoreGraphics.CGRect;

namespace Xamarin.Forms.Platform.iOS
{
Expand Down
3 changes: 2 additions & 1 deletion Xamarin.Forms.Platform.iOS/Renderers/TabbedRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
using PageUIStatusBarAnimation = Xamarin.Forms.PlatformConfiguration.iOSSpecific.UIStatusBarAnimation;
using TabbedPageConfiguration = Xamarin.Forms.PlatformConfiguration.iOSSpecific.TabbedPage;
using TranslucencyMode = Xamarin.Forms.PlatformConfiguration.iOSSpecific.TranslucencyMode;
using RectangleF = CoreGraphics.CGRect;

namespace Xamarin.Forms.Platform.iOS
{
Expand Down Expand Up @@ -133,7 +134,7 @@ public override void ViewDidLayoutSubviews()

if (!Element.Bounds.IsEmpty)
{
View.Frame = new System.Drawing.RectangleF((float)Element.X, (float)Element.Y, (float)Element.Width, (float)Element.Height);
View.Frame = new RectangleF((float)Element.X, (float)Element.Y, (float)Element.Width, (float)Element.Height);
}

var frame = View.Frame;
Expand Down
1 change: 1 addition & 0 deletions Xamarin.Forms.Platform.iOS/Renderers/WkWebViewRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
using Xamarin.Forms.Internals;
using PreserveAttribute = Foundation.PreserveAttribute;
using Uri = System.Uri;
using RectangleF = CoreGraphics.CGRect;

namespace Xamarin.Forms.Platform.iOS
{
Expand Down
2 changes: 2 additions & 0 deletions Xamarin.Forms.Platform.iOS/VisualElementTracker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
using CoreAnimation;
using CoreGraphics;
using Xamarin.Forms.Internals;
using RectangleF = CoreGraphics.CGRect;
using PointF = CoreGraphics.CGPoint;

#if __MOBILE__
using UIKit;
Expand Down