Skip to content

Commit 96ae680

Browse files
authored
Merge pull request #7445 from unoplatform/dev/jela/net6
Update for .NET 6 and VS 2022 RTM
2 parents cdc902b + 3824314 commit 96ae680

File tree

65 files changed

+381
-58
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+381
-58
lines changed

build/PackageDiffIgnore.xml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7273,6 +7273,60 @@
72737273
<Member
72747274
fullName="System.Void Windows.UI.Xaml.Controls.Primitives.CommandBarTemplateSettings..ctor(Windows.UI.Xaml.Controls.CommandBar commandBar)"
72757275
reason="API alignment" />
7276+
7277+
7278+
<!-- BEGIN .NET 6 BREAKING CHANGE -->
7279+
<Member fullName="System.Void UIKit.UIViewExtensions.SetDimensions(UIKit.UIView view, System.Nullable`1&lt;System.nfloat&gt; width, System.Nullable`1&lt;System.nfloat&gt; height)" reason=".NET 6 RTM breaking change" />
7280+
<Member fullName="System.nfloat UIKit.UIViewExtensions.StackSubViews(UIKit.UIView thisView)" reason=".NET 6 RTM breaking change" />
7281+
<Member fullName="System.nfloat UIKit.UIViewExtensions.StackSubViews(UIKit.UIView thisView, System.Single topPadding, System.Single spaceBetweenElements)" reason=".NET 6 RTM breaking change" />
7282+
<Member fullName="System.nfloat UIKit.UIViewExtensions.GetNativeAlpha(UIKit.UIView view)" reason=".NET 6 RTM breaking change" />
7283+
<Member fullName="System.Void Windows.UI.Xaml.Controls.ListViewBaseScrollContentPresenter.SetZoomScale(System.nfloat scale, System.Boolean animated)" reason=".NET 6 RTM breaking change" />
7284+
<Member fullName="System.nfloat Windows.UI.Xaml.Controls.VirtualizingPanelLayout.LayoutItemsInGroup(System.Int32 group, System.nfloat availableBreadth, CoreGraphics.CGRect&amp; frame, System.Boolean createLayoutInfo, System.Collections.Generic.Dictionary`2&lt;Foundation.NSIndexPath,System.Nullable`1&lt;CoreGraphics.CGSize&gt;&gt; oldItemSizes)" reason=".NET 6 RTM breaking change" />
7285+
<Member fullName="System.Void Windows.UI.Xaml.Controls.VirtualizingPanelLayout.UpdateLayoutAttributesForGroupHeader(UIKit.UICollectionViewLayoutAttributes groupHeaderLayout, System.nfloat extentDifference, System.Boolean applyOffsetToThis)" reason=".NET 6 RTM breaking change" />
7286+
<Member fullName="CoreGraphics.CGRect Windows.UI.Xaml.Controls.VirtualizingPanelLayout.AdjustExtentOffset(CoreGraphics.CGRect frame, System.nfloat adjustment)" reason=".NET 6 RTM breaking change" />
7287+
<Member fullName="CoreGraphics.CGPoint Windows.UI.Xaml.Controls.VirtualizingPanelLayout.AdjustExtentOffset(CoreGraphics.CGPoint point, System.nfloat adjustment)" reason=".NET 6 RTM breaking change" />
7288+
<Member fullName="System.nfloat Windows.UI.Xaml.Controls.VirtualizingPanelLayout.GetExtentStart(CoreGraphics.CGRect frame)" reason=".NET 6 RTM breaking change" />
7289+
<Member fullName="System.nfloat Windows.UI.Xaml.Controls.VirtualizingPanelLayout.GetExtentEnd(CoreGraphics.CGRect frame)" reason=".NET 6 RTM breaking change" />
7290+
<Member fullName="System.nfloat Windows.UI.Xaml.Controls.VirtualizingPanelLayout.GetBreadth(CoreGraphics.CGSize size)" reason=".NET 6 RTM breaking change" />
7291+
<Member fullName="System.nfloat Windows.UI.Xaml.Controls.VirtualizingPanelLayout.GetBreadthStart(CoreGraphics.CGRect frame)" reason=".NET 6 RTM breaking change" />
7292+
<Member fullName="System.nfloat Windows.UI.Xaml.Controls.VirtualizingPanelLayout.GetBreadthEnd(CoreGraphics.CGRect frame)" reason=".NET 6 RTM breaking change" />
7293+
<Member fullName="System.Void Windows.UI.Xaml.Controls.VirtualizingPanelLayout.SetBreadthStart(CoreGraphics.CGRect&amp; frame, System.nfloat breadthStart)" reason=".NET 6 RTM breaking change" />
7294+
<Member fullName="System.Void Windows.UI.Xaml.Controls.VirtualizingPanelLayout.SetBreadth(CoreGraphics.CGRect&amp; frame, System.nfloat breadth)" reason=".NET 6 RTM breaking change" />
7295+
<Member fullName="System.Void Windows.UI.Xaml.Controls.VirtualizingPanelLayout.SetExtentStart(CoreGraphics.CGRect&amp; frame, System.nfloat extentStart)" reason=".NET 6 RTM breaking change" />
7296+
<Member fullName="System.Void Windows.UI.Xaml.Controls.VirtualizingPanelLayout.SetExtent(CoreGraphics.CGSize&amp; size, System.nfloat extent)" reason=".NET 6 RTM breaking change" />
7297+
<Member fullName="CoreGraphics.CGPoint Windows.UI.Xaml.Controls.VirtualizingPanelLayout.SetExtentOffset(CoreGraphics.CGPoint point, System.nfloat newOffset)" reason=".NET 6 RTM breaking change" />
7298+
<Member fullName="System.nfloat Uno.UI.ViewHelper.get_OnePixel()" reason=".NET 6 RTM breaking change" />
7299+
<Member fullName="System.nfloat Uno.UI.ViewHelper.GetConvertedPixel(System.Single thickness)" reason=".NET 6 RTM breaking change" />
7300+
<Member fullName="System.nfloat Uno.UI.ViewHelper.StackSubViews(System.Collections.Generic.IEnumerable`1&lt;UIKit.UIView&gt; views)" reason=".NET 6 RTM breaking change" />
7301+
<Member fullName="System.nfloat Uno.UI.ViewHelper.StackSubViews(UIKit.UIView thisView, System.Single topPadding, System.Single spaceBetweenElements)" reason=".NET 6 RTM breaking change" />
7302+
<Member fullName="CoreGraphics.CGRect Uno.UI.Extensions.CGRectExtensions.IncrementX(CoreGraphics.CGRect thisCGRect, System.nfloat delta)" reason=".NET 6 RTM breaking change" />
7303+
<Member fullName="CoreGraphics.CGRect Uno.UI.Extensions.CGRectExtensions.IncrementY(CoreGraphics.CGRect thisCGRect, System.nfloat delta)" reason=".NET 6 RTM breaking change" />
7304+
<Member fullName="CoreGraphics.CGRect Uno.UI.Extensions.CGRectExtensions.SetX(CoreGraphics.CGRect thisCGRect, System.nfloat value)" reason=".NET 6 RTM breaking change" />
7305+
<Member fullName="CoreGraphics.CGRect Uno.UI.Extensions.CGRectExtensions.SetY(CoreGraphics.CGRect thisCGRect, System.nfloat value)" reason=".NET 6 RTM breaking change" />
7306+
<Member fullName="CoreGraphics.CGRect Uno.UI.Extensions.CGRectExtensions.SetBottom(CoreGraphics.CGRect thisCGRect, System.nfloat value)" reason=".NET 6 RTM breaking change" />
7307+
<Member fullName="CoreGraphics.CGRect Uno.UI.Extensions.CGRectExtensions.SetRight(CoreGraphics.CGRect thisCGRect, System.nfloat value)" reason=".NET 6 RTM breaking change" />
7308+
<Member fullName="CoreGraphics.CGRect Uno.UI.Extensions.CGRectExtensions.SetRightRespectWidth(CoreGraphics.CGRect thisCGRect, System.nfloat value)" reason=".NET 6 RTM breaking change" />
7309+
<Member fullName="CoreGraphics.CGRect Uno.UI.Extensions.CGRectExtensions.SetHorizontalCenter(CoreGraphics.CGRect thisCGRect, System.nfloat value)" reason=".NET 6 RTM breaking change" />
7310+
<Member fullName="CoreGraphics.CGRect Uno.UI.Extensions.CGRectExtensions.SetVerticalCenter(CoreGraphics.CGRect thisCGRect, System.nfloat value)" reason=".NET 6 RTM breaking change" />
7311+
<Member fullName="CoreGraphics.CGRect Uno.UI.Extensions.CGRectExtensions.Shrink(CoreGraphics.CGRect thisCGRect, System.nfloat numberOfPixels)" reason=".NET 6 RTM breaking change" />
7312+
<Member fullName="CoreGraphics.CGRect Uno.UI.Extensions.CGRectExtensions.Shrink(CoreGraphics.CGRect thisCGRect, System.nfloat left, System.nfloat top, System.nfloat right, System.nfloat bottom)" reason=".NET 6 RTM breaking change" />
7313+
<Member fullName="CoreGraphics.CGRect Uno.UI.Extensions.CGRectExtensions.IncrementHeight(CoreGraphics.CGRect thisCGRect, System.nfloat delta)" reason=".NET 6 RTM breaking change" />
7314+
<Member fullName="CoreGraphics.CGRect Uno.UI.Extensions.CGRectExtensions.IncrementWidth(CoreGraphics.CGRect thisCGRect, System.nfloat delta)" reason=".NET 6 RTM breaking change" />
7315+
<Member fullName="CoreGraphics.CGRect Uno.UI.Extensions.CGRectExtensions.SetWidth(CoreGraphics.CGRect thisCGRect, System.nfloat value)" reason=".NET 6 RTM breaking change" />
7316+
<Member fullName="CoreGraphics.CGRect Uno.UI.Extensions.CGRectExtensions.SetHeight(CoreGraphics.CGRect thisCGRect, System.nfloat value)" reason=".NET 6 RTM breaking change" />
7317+
<Member fullName="System.nfloat Uno.UI.Extensions.CGRectExtensions.GetXOrY(CoreGraphics.CGRect rect, System.Int32 axisIndex)" reason=".NET 6 RTM breaking change" />
7318+
<Member fullName="System.nfloat Uno.UI.Extensions.CGRectExtensions.GetWidthOrHeight(CoreGraphics.CGRect rect, System.Int32 axisIndex)" reason=".NET 6 RTM breaking change" />
7319+
<Member fullName="CoreGraphics.CGRect Uno.UI.Extensions.CGRectExtensions.SetXOrY(CoreGraphics.CGRect rect, System.Int32 axisIndex, System.nfloat newXYValue)" reason=".NET 6 RTM breaking change" />
7320+
<Member fullName="System.nfloat Uno.UI.Extensions.CGPointExtensions.GetXOrY(CoreGraphics.CGPoint point, System.Int32 axisIndex)" reason=".NET 6 RTM breaking change" />
7321+
<Member fullName="T Uno.UI.Extensions.UIViewPositioningExtensions.SetY(T thisView, System.nfloat value)" reason=".NET 6 RTM breaking change" />
7322+
<Member fullName="System.Void AppKit.UIViewExtensions.SetDimensions(AppKit.NSView view, System.Nullable`1&lt;System.nfloat&gt; width, System.Nullable`1&lt;System.nfloat&gt; height)" reason=".NET 6 RTM breaking change" />
7323+
<Member fullName="System.nfloat AppKit.UIViewExtensions.StackSubViews(AppKit.NSView thisView)" reason=".NET 6 RTM breaking change" />
7324+
<Member fullName="System.nfloat AppKit.UIViewExtensions.StackSubViews(AppKit.NSView thisView, System.Single topPadding, System.Single spaceBetweenElements)" reason=".NET 6 RTM breaking change" />
7325+
<Member fullName="System.nfloat AppKit.UIViewExtensions.GetNativeAlpha(AppKit.NSView view)" reason=".NET 6 RTM breaking change" />
7326+
<Member fullName="System.nfloat Uno.UI.ViewHelper.StackSubViews(System.Collections.Generic.IEnumerable`1&lt;AppKit.NSView&gt; views)" reason=".NET 6 RTM breaking change" />
7327+
<Member fullName="System.nfloat Uno.UI.ViewHelper.StackSubViews(AppKit.NSView thisView, System.Single topPadding, System.Single spaceBetweenElements)" reason=".NET 6 RTM breaking change" />
7328+
<Member fullName="System.nfloat Uno.UI.Extensions.FontWeightExtensions.ToNSFontWeight(Windows.UI.Text.FontWeight fontWeight)" reason=".NET 6 RTM breaking change" />
7329+
<!-- END .NET 6 BREAKING CHANGE -->
72767330
</Methods>
72777331
<Events>
72787332
<Member
@@ -8257,6 +8311,12 @@
82578311
<Member
82588312
fullName="Windows.UI.Core.CoreDispatcher Windows.UI.Core.CoreDispatcher::Main"
82598313
reason="API alignment" />
8314+
8315+
<!-- BEGIN .NET 6 BREAKING CHANGE -->
8316+
<Member fullName="System.Collections.Generic.Dictionary`2&lt;System.Int32,System.nfloat&gt; Windows.UI.Xaml.Controls.VirtualizingPanelLayout::_sectionEnd" reason=".NET 6 RTM breaking change" />
8317+
<Member fullName="System.nfloat Uno.UI.ViewHelper::MainScreenScale" reason=".NET 6 RTM breaking change" />
8318+
<!-- END .NET 6 BREAKING CHANGE -->
8319+
82608320
</Fields>
82618321
<Properties>
82628322
<Member
@@ -8330,6 +8390,10 @@
83308390
<Member
83318391
fullName="Windows.UI.Xaml.Controls.ListViewBase Windows.UI.Xaml.Controls.VirtualizingPanelLayout::XamlParent()"
83328392
reason="Make non-standard property internal" />
8393+
8394+
<!-- BEGIN .NET 6 BREAKING CHANGE -->
8395+
<Member fullName="System.nfloat Uno.UI.ViewHelper::OnePixel()" reason=".NET 6 RTM breaking change" />
8396+
<!-- END .NET 6 BREAKING CHANGE -->
83338397
</Properties>
83348398
</IgnoreSet>
83358399
<!--

build/ci/templates/dotnet6-install-mac.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
parameters:
2-
DotNetVersion: '6.0.100-rc.1.21452.64'
3-
MauiCheck_Version: '0.8.5'
4-
MauiCheck_Manifest: 'https://raw.githubusercontent.com/Redth/dotnet-maui-check/d469cb3804d68ad52a1bfec041b95a8800acf4ab/manifests/maui-preview.manifest.json'
2+
DotNetVersion: '6.0.100'
3+
UnoCheck_Version: '0.2.0-dev.361'
4+
UnoCheck_Manifest: 'https://raw.githubusercontent.com/unoplatform/uno.check/bf3684e2ad725baa66da3573759129d6bb1d8817/manifests/uno.ui.manifest.json'
55
Dotnet_Root: '/usr/local/share/dotnet/'
66
Dotnet_Tools: '~/.dotnet/tools'
77

@@ -32,6 +32,6 @@ steps:
3232
displayName: Select JDK 11
3333
3434
- bash: |
35-
dotnet tool update --global redth.net.maui.check --version ${{ parameters.MauiCheck_Version }} --add-source https://api.nuget.org/v3/index.json
36-
maui-check --ci --non-interactive --fix --skip androidsdk --skip xcode --skip vswin --skip vsmac --manifest ${{ parameters.MauiCheck_Manifest }}
35+
dotnet tool update --global uno.check --version ${{ parameters.UnoCheck_Version }} --add-source https://api.nuget.org/v3/index.json
36+
uno-check --ci --non-interactive --fix --skip androidsdk --skip gtk3 --skip xcode --skip vswin --skip vsmac --manifest ${{ parameters.UnoCheck_Manifest }}
3737
displayName: Install .NET Workloads

build/ci/templates/dotnet6-install-windows.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
parameters:
2-
DotNetVersion: '6.0.100-rc.1.21452.64'
3-
MauiCheck_Version: '0.8.5'
4-
MauiCheck_Manifest: 'https://raw.githubusercontent.com/Redth/dotnet-maui-check/d469cb3804d68ad52a1bfec041b95a8800acf4ab/manifests/maui-preview.manifest.json'
2+
DotNetVersion: '6.0.100'
3+
UnoCheck_Version: '0.2.0-dev.361'
4+
UnoCheck_Manifest: 'https://raw.githubusercontent.com/unoplatform/uno.check/bf3684e2ad725baa66da3573759129d6bb1d8817/manifests/uno.ui.manifest.json'
55

66
steps:
77

@@ -20,8 +20,8 @@ steps:
2020
displayName: Select JDK 11
2121
2222
- powershell: |
23-
& dotnet tool update --global redth.net.maui.check --version ${{ parameters.MauiCheck_Version }} --add-source https://api.nuget.org/v3/index.json
24-
& maui-check -v --ci --non-interactive --fix --skip xcode --skip vswin --skip vsmac --manifest ${{ parameters.MauiCheck_Manifest }}
23+
& dotnet tool update --global uno.check --version ${{ parameters.UnoCheck_Version }} --add-source https://api.nuget.org/v3/index.json
24+
& uno-check -v --ci --non-interactive --fix --skip xcode --skip gtk3 --skip vswin --skip vsmac --manifest ${{ parameters.UnoCheck_Manifest }}
2525
displayName: Install .NET Workloads
2626
errorActionPreference: continue
2727
ignoreLASTEXITCODE: true

src/SamplesApp/SamplesApp.UnitTests.Shared/Controls/UITests/Presentation/SampleChooserViewModel.iOS.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@
2020
using Uno.Logging;
2121
using Microsoft.Extensions.Logging;
2222

23+
#if NET6_0_OR_GREATER
24+
using ObjCRuntime;
25+
#endif
26+
2327
namespace SampleControl.Presentation
2428
{
2529

src/SamplesApp/SamplesApp.UnitTests.Shared/Controls/UITests/Presentation/SampleChooserViewModel.macOS.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@
2020
using Uno.Logging;
2121
using Microsoft.Extensions.Logging;
2222

23+
#if NET6_0_OR_GREATER
24+
using ObjCRuntime;
25+
#endif
26+
2327
namespace SampleControl.Presentation
2428
{
2529

src/SolutionTemplate/UnoSolutionTemplate.VSIX.2022/UnoSolutionTemplate.VSIX.2022.csproj

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,13 @@
9999
<IncludeOutputGroupsInVSIX>BuiltProjectOutputGroup%3bBuiltProjectOutputGroupDependencies%3bGetCopyToOutputDirectoryItems%3bSatelliteDllsProjectOutputGroup%3b</IncludeOutputGroupsInVSIX>
100100
<IncludeOutputGroupsInVSIXLocalOnly>DebugSymbolsProjectOutputGroup%3b</IncludeOutputGroupsInVSIXLocalOnly>
101101
</ProjectReference>
102+
<ProjectReference Include="..\UnoSolutionTemplate\UnoSolutionTemplate.csproj">
103+
<Project>{5C7C339E-B73C-4FDA-87AF-E8003C0FF2AB}</Project>
104+
<Name>UnoSolutionTemplate</Name>
105+
<VSIXSubPath>ProjectTemplates</VSIXSubPath>
106+
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
107+
<IncludeOutputGroupsInVSIX>TemplateProjectOutputGroup%3b</IncludeOutputGroupsInVSIX>
108+
</ProjectReference>
102109
</ItemGroup>
103110
<ItemGroup>
104111
<Content Include="logo.png">

src/SolutionTemplate/UnoSolutionTemplate.VSIX.2022/source.extension.vsixmanifest

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,6 @@
2626
<Asset Type="Microsoft.VisualStudio.ItemTemplate" d:Source="Project" d:ProjectName="UnoItemTemplate" d:TargetPath="|UnoItemTemplate;TemplateProjectOutputGroup|" Path="ItemTemplates" d:VsixSubPath="ItemTemplates" />
2727
<Asset Type="Microsoft.VisualStudio.ProjectTemplate" d:Source="Project" d:ProjectName="UnoLibraryTemplate.net6" d:TargetPath="|UnoLibraryTemplate.net6;TemplateProjectOutputGroup|" Path="ProjectTemplates" d:VsixSubPath="ProjectTemplates" />
2828
<Asset Type="Microsoft.VisualStudio.MefComponent" d:Source="Project" d:ProjectName="%CurrentProject%" Path="|%CurrentProject%|" />
29+
<Asset Type="Microsoft.VisualStudio.ProjectTemplate" d:Source="Project" d:ProjectName="UnoSolutionTemplate" d:TargetPath="|UnoSolutionTemplate;TemplateProjectOutputGroup|" Path="ProjectTemplates" d:VsixSubPath="ProjectTemplates" />
2930
</Assets>
3031
</PackageManifest>

src/SolutionTemplate/UnoSolutionTemplate.net6/UnoApp.vstemplate

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<VSTemplate Version="3.0.0" Type="ProjectGroup" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005">
22
<TemplateData>
3-
<Name>Multi-Platform App (Uno Platform)</Name>
3+
<Name>Multi-Platform App (Uno Platform|net6)</Name>
44
<Description>Template for creating a multi-platform C# &amp; XAML application targeting UWP, WebAssembly, Android, iOS, macOS and Linux</Description>
55
<ProjectType>CSharp</ProjectType>
66
<ProjectSubType />

src/SolutionTemplate/UnoSolutionTemplate/UnoApp.vstemplate

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<VSTemplate Version="3.0.0" Type="ProjectGroup" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005">
22
<TemplateData>
3-
<Name>Multi-Platform App (Uno Platform)</Name>
3+
<Name>Multi-Platform App (Uno Platform|Xamarin)</Name>
44
<Description>Template for creating a multi-platform C# &amp; XAML application targeting UWP, WebAssembly, Android, iOS, macOS and Linux</Description>
55
<ProjectType>CSharp</ProjectType>
66
<ProjectSubType />

src/Uno.UI.Toolkit/UIElementExtensions.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@
2020
using CoreGraphics;
2121
#endif
2222

23+
#if NET6_0_OR_GREATER && (__IOS__ || __MACOS__)
24+
using ObjCRuntime;
25+
#endif
26+
2327
namespace Uno.UI.Toolkit
2428
{
2529
#if !NET6_0_OR_GREATER // Moved to the linker definition file

src/Uno.UI/Controls/CommandBar/AppBarButtonRenderer.iOS.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
using Uno.Logging;
1515
using Uno.UI.Extensions;
1616

17+
#if NET6_0_OR_GREATER
18+
using ObjCRuntime;
19+
#endif
20+
1721
namespace Uno.UI.Controls
1822
{
1923
internal class AppBarButtonRenderer : Renderer<AppBarButton, UIBarButtonItem>

src/Uno.UI/Controls/NSFontHelper.macOS.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313
using Uno.Logging;
1414
using AppKit;
1515

16+
#if NET6_0_OR_GREATER
17+
using ObjCRuntime;
18+
#endif
19+
1620
namespace Windows.UI
1721
{
1822
internal static class NSFontHelper

src/Uno.UI/Controls/UIColorHelper.iOS.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77
using nfloat = System.Single;
88
#endif
99

10+
#if NET6_0_OR_GREATER
11+
using ObjCRuntime;
12+
#endif
13+
1014
namespace Windows.UI
1115
{
1216
public static class UIColors

src/Uno.UI/Controls/UIFontHelper.iOS.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
using Uno.Logging;
1515
using Uno.UI;
1616

17+
#if NET6_0_OR_GREATER
18+
using ObjCRuntime;
19+
#endif
20+
1721
namespace Windows.UI
1822
{
1923
internal static class UIFontHelper

src/Uno.UI/Controls/Window.iOS.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@
2121
using Windows.UI.Xaml.Controls.Primitives;
2222
using Windows.UI.Xaml.Input;
2323

24+
#if NET6_0_OR_GREATER
25+
using ObjCRuntime;
26+
#endif
27+
2428
namespace Uno.UI.Controls
2529
{
2630
/// <summary>

src/Uno.UI/Controls/Window.macOS.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@
2626
using Windows.UI.Input;
2727
using Point = Windows.Foundation.Point;
2828

29+
#if NET6_0_OR_GREATER
30+
using ObjCRuntime;
31+
#endif
32+
2933
namespace Uno.UI.Controls
3034
{
3135
/// <summary>

src/Uno.UI/Extensions/CGRectExtensions.iOSmacOS.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
using System;
33
using System.Drawing;
44

5+
#if NET6_0_OR_GREATER
6+
using ObjCRuntime;
7+
#endif
8+
59
namespace Uno.UI.Extensions
610
{
711
public static class CGRectExtensions

src/Uno.UI/Extensions/Extensions/CGPointExtensions.iOSmacOS.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
using System.Collections.Generic;
44
using System.Text;
55

6+
#if NET6_0_OR_GREATER
7+
using ObjCRuntime;
8+
#endif
9+
610
namespace Uno.UI.Extensions
711
{
812
public static class CGPointExtensions

src/Uno.UI/Extensions/FontWeightExtensions.macOS.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
using AppKit;
66
using Windows.UI.Text;
77

8+
#if NET6_0_OR_GREATER
9+
using ObjCRuntime;
10+
#endif
11+
812
namespace Uno.UI.Extensions
913
{
1014
public static class FontWeightExtensions

src/Uno.UI/Extensions/ScrollViewExtensions.iOS.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
using System;
22
using System.Drawing;
33

4+
#if NET6_0_OR_GREATER
5+
using ObjCRuntime;
6+
#endif
7+
48
#if XAMARIN_IOS_UNIFIED
59
using UIKit;
610
using CoreGraphics;

src/Uno.UI/Extensions/UIViewExtensions.iOSmacOS.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@
1616
using Uno.UI.Controls;
1717
using Windows.UI.Xaml.Controls;
1818
using Windows.UI.Xaml.Media;
19+
20+
#if NET6_0_OR_GREATER
21+
using ObjCRuntime;
22+
#endif
23+
1924
#if XAMARIN_IOS_UNIFIED
2025
using Foundation;
2126
using UIKit;

src/Uno.UI/Extensions/ViewHelper.iOSmacOS.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
using Foundation;
1010
using CoreGraphics;
1111

12+
#if NET6_0_OR_GREATER
13+
using ObjCRuntime;
14+
#endif
15+
1216
#if __IOS__
1317
using UIKit;
1418
using _View = UIKit.UIView;

src/Uno.UI/Extensions/ViewPositionExtensions.iOSmacOS.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
using CoreGraphics;
33
using System;
44

5+
#if NET6_0_OR_GREATER
6+
using ObjCRuntime;
7+
#endif
8+
59
#if __IOS__
610
using UIKit;
711
using _View = UIKit.UIView;

src/Uno.UI/Media/PathStreamGeometryContext.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,16 @@
1010
#if __IOS__
1111
using UIKit;
1212
using Path = UIKit.UIBezierPath;
13+
#if NET6_0_OR_GREATER
14+
using ObjCRuntime;
15+
#endif
1316
#elif __MACOS__
1417
using AppKit;
1518
using Path = AppKit.NSBezierPath;
1619
using CoreGraphics;
20+
#if NET6_0_OR_GREATER
21+
using ObjCRuntime;
22+
#endif
1723
#elif __ANDROID__
1824
using Android.Graphics.Drawables.Shapes;
1925
using Path = Android.Graphics.Path;

src/Uno.UI/Media/StreamGeometry.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,19 @@
1111
using UIKit;
1212
using CoreGraphics;
1313
using Path = UIKit.UIBezierPath;
14+
#if NET6_0_OR_GREATER
15+
using ObjCRuntime;
16+
#endif
1417
#elif __MACOS__
1518
using AppKit;
1619
using CoreGraphics;
1720
using UIImage = AppKit.NSImage;
1821
using UIColor = AppKit.NSColor;
1922
using UIGraphics = AppKit.NSGraphics;
2023
using Path = AppKit.NSBezierPath;
24+
#if NET6_0_OR_GREATER
25+
using ObjCRuntime;
26+
#endif
2127
#elif XAMARIN_ANDROID
2228
using Android.Graphics;
2329
#elif __SKIA__

src/Uno.UI/Microsoft/UI/Xaml/Media/RadialGradientBrush.iOSmacOS.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
using CoreGraphics;
66
using Uno.Extensions;
77

8+
#if NET6_0_OR_GREATER
9+
using ObjCRuntime;
10+
#endif
11+
812
namespace Microsoft.UI.Xaml.Media
913
{
1014
partial class RadialGradientBrush

src/Uno.UI/UI/LayoutHelper.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
using Windows.UI.Xaml;
66
using static System.Double;
77

8+
#if NET6_0_OR_GREATER && (__IOS__ || __MACOS__)
9+
using ObjCRuntime;
10+
#endif
11+
812
namespace Uno.UI
913
{
1014
internal static partial class LayoutHelper

0 commit comments

Comments
 (0)