Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Xamarin Forms to 3.6.0.264807 #226

Merged
merged 1 commit into from
Mar 22, 2019
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
8 changes: 6 additions & 2 deletions Ooui.Forms/Forms.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System;
using System.Diagnostics;
using Xamarin.Forms;
using Xamarin.Forms.Internals;
using Ooui.Forms;
using System.IO;
Expand Down Expand Up @@ -143,6 +141,12 @@ protected override void EnableTimer ()
public void QuitApplication()
{
}

public SizeRequest GetNativeSize(VisualElement view, double widthConstraint, double heightConstraint)
{
var renderer = Ooui.Forms.Platform.GetRenderer(view);
return renderer.GetDesiredSize(widthConstraint, heightConstraint);
}
}

public class ViewInitializedEventArgs
Expand Down
4 changes: 2 additions & 2 deletions Ooui.Forms/Ooui.Forms.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Version>1.0.0</Version>
Expand All @@ -18,7 +18,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Xamarin.Forms" Version="3.0.0.482510" />
<PackageReference Include="Xamarin.Forms" Version="3.6.0.264807" />
</ItemGroup>
<ItemGroup>
<Folder Include="Extensions\" />
Expand Down
20 changes: 17 additions & 3 deletions Ooui.Forms/Platform.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@

namespace Ooui.Forms
{
public class Platform : BindableObject, IPlatform, INavigation, IDisposable
public class Platform : BindableObject, INavigation, IDisposable
#pragma warning disable CS0618 // Type or member is obsolete
, IPlatform
#pragma warning restore CS0618 // Type or member is obsolete
{
bool _disposed;

Expand Down Expand Up @@ -99,7 +102,7 @@ protected override void OnBindingContextChanged ()
base.OnBindingContextChanged ();
}

public SizeRequest GetNativeSize (VisualElement view, double widthConstraint, double heightConstraint)
public static SizeRequest GetNativeSize (VisualElement view, double widthConstraint, double heightConstraint)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know man...

{
var renderView = GetRenderer (view);
if (renderView == null || renderView.NativeView == null)
Expand All @@ -116,8 +119,12 @@ public void SetPage (Page newRoot)
throw new NotImplementedException ();
Page = newRoot;

#pragma warning disable CS0618 // Type or member is obsolete
// The Platform property is no longer necessary, but we have to set it because some third-party
// library might still be retrieving it and using it
Page.Platform = this;
AddChild (Page);
#pragma warning restore CS0618 // Type or member is obsolete
AddChild(Page);

Page.DescendantRemoved += HandleChildRemoved;

Expand Down Expand Up @@ -232,5 +239,12 @@ void INavigation.RemovePage (Page page)
{
throw new NotImplementedException ();
}

#region obsolete
SizeRequest IPlatform.GetNativeSize (VisualElement view, double widthConstraint, double heightConstraint)
{
return GetNativeSize(view, widthConstraint, heightConstraint);
}
#endregion
}
}
8 changes: 6 additions & 2 deletions Ooui.Forms/Renderers/NavigationPageRenderer.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.ComponentModel;
using System.Net;
using System.Text;
using Xamarin.Forms;
using Xamarin.Forms.Internals;
using System.Linq;
Expand Down Expand Up @@ -161,18 +159,24 @@ private void OnChildrenChanged(object sender, NotifyCollectionChangedEventArgs e

private void OnPopToRootRequested(object sender, NavigationRequestedEventArgs e)
{
#pragma warning disable CS0618 // Type or member is obsolete
e.Realize = true;
#pragma warning restore CS0618 // Type or member is obsolete
}

private void OnPopRequested(object sender, NavigationRequestedEventArgs e)
{
#pragma warning disable CS0618 // Type or member is obsolete
e.Realize = true;
#pragma warning restore CS0618 // Type or member is obsolete
}

// This is where you would draw the new contents.
private void OnPushRequested(object sender, NavigationRequestedEventArgs e)
{
#pragma warning disable CS0618 // Type or member is obsolete
e.Realize = true;
#pragma warning restore CS0618 // Type or member is obsolete
}

private string GenerateFullHash()
Expand Down
4 changes: 2 additions & 2 deletions PlatformSamples/AspNetCoreMvc/AspNetCoreMvc.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
Expand All @@ -9,7 +9,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.9" />
<PackageReference Include="Xamarin.Forms" Version="3.0.0.482510" />
<PackageReference Include="Xamarin.Forms" Version="3.6.0.264807" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion Samples/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ static void Main (string[] args)
sample.Publish();
}

var samplePage = new SamplePickerSample(samples);
var samplePage = new SamplePicker(samples);
samplePage.Publish();

UI.Present (samplePage.Path);
Expand Down
4 changes: 2 additions & 2 deletions Samples/SamplePickerSample.cs → Samples/SamplePicker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@

namespace Samples
{
public class SamplePickerSample : ISample
public class SamplePicker : ISample
{
private readonly IEnumerable<ISample> _samplePages;

public SamplePickerSample(IEnumerable<ISample> samplePages)
public SamplePicker(IEnumerable<ISample> samplePages)
{
_samplePages = samplePages.OrderBy(s => s.Title);
}
Expand Down
2 changes: 1 addition & 1 deletion Samples/Samples.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Xamarin.Forms" Version="3.0.0.482510" />
<PackageReference Include="Xamarin.Forms" Version="3.6.0.264807" />
</ItemGroup>

<ItemGroup>
Expand Down