Update Xamarin.Forms to v3.0.0.482510 (fixes https://github.com/praeclarum/Ooui/issues/26)

This commit is contained in:
Kevin Gliewe 2018-05-15 10:30:42 +02:00
parent 2c5efd7cf8
commit e700308e7c
7 changed files with 10 additions and 12 deletions

View File

@ -27,12 +27,12 @@ namespace Ooui.Forms
throw new NotSupportedException (); throw new NotSupportedException ();
} }
public Task<Stream> OpenFileAsync (string path, Xamarin.Forms.Internals.FileMode mode, Xamarin.Forms.Internals.FileAccess access) public Task<Stream> OpenFileAsync (string path, FileMode mode, FileAccess access)
{ {
throw new NotSupportedException (); throw new NotSupportedException ();
} }
public Task<Stream> OpenFileAsync (string path, Xamarin.Forms.Internals.FileMode mode, Xamarin.Forms.Internals.FileAccess access, Xamarin.Forms.Internals.FileShare share) public Task<Stream> OpenFileAsync (string path, FileMode mode, FileAccess access, FileShare share)
{ {
throw new NotSupportedException (); throw new NotSupportedException ();
} }

View File

@ -18,7 +18,7 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Xamarin.Forms" Version="2.5.0.122203" /> <PackageReference Include="Xamarin.Forms" Version="3.0.0.482510" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Folder Include="Extensions\" /> <Folder Include="Extensions\" />

View File

@ -65,7 +65,7 @@ namespace Ooui.Forms.Renderers
UpdateTextColor (); UpdateTextColor ();
else if (e.PropertyName == Xamarin.Forms.Button.FontProperty.PropertyName) else if (e.PropertyName == Xamarin.Forms.Button.FontProperty.PropertyName)
UpdateFont (); UpdateFont ();
else if (e.PropertyName == Xamarin.Forms.Button.BorderWidthProperty.PropertyName || e.PropertyName == Xamarin.Forms.Button.BorderRadiusProperty.PropertyName || e.PropertyName == Xamarin.Forms.Button.BorderColorProperty.PropertyName) else if (e.PropertyName == Xamarin.Forms.Button.BorderWidthProperty.PropertyName || e.PropertyName == Xamarin.Forms.Button.CornerRadiusProperty.PropertyName || e.PropertyName == Xamarin.Forms.Button.BorderColorProperty.PropertyName)
UpdateBorder (); UpdateBorder ();
else if (e.PropertyName == Xamarin.Forms.Button.ImageProperty.PropertyName) else if (e.PropertyName == Xamarin.Forms.Button.ImageProperty.PropertyName)
UpdateImage (); UpdateImage ();
@ -96,7 +96,7 @@ namespace Ooui.Forms.Renderers
uiButton.Style.BorderWidth = null; uiButton.Style.BorderWidth = null;
} }
var br = button.BorderRadius; var br = button.CornerRadius;
if (br > 0 && (bw > 0 || br != 5)) { // 5 is the default if (br > 0 && (bw > 0 || br != 5)) { // 5 is the default
uiButton.Style.BorderRadius = br + "px"; uiButton.Style.BorderRadius = br + "px";
} }

View File

@ -20,7 +20,7 @@ namespace Ooui.Forms.Renderers
base.OnElementPropertyChanged (sender, e); base.OnElementPropertyChanged (sender, e);
if (e.PropertyName == VisualElement.BackgroundColorProperty.PropertyName || if (e.PropertyName == VisualElement.BackgroundColorProperty.PropertyName ||
e.PropertyName == Xamarin.Forms.Frame.OutlineColorProperty.PropertyName || e.PropertyName == Xamarin.Forms.Frame.BorderColorProperty.PropertyName ||
e.PropertyName == Xamarin.Forms.Frame.HasShadowProperty.PropertyName || e.PropertyName == Xamarin.Forms.Frame.HasShadowProperty.PropertyName ||
e.PropertyName == Xamarin.Forms.Frame.CornerRadiusProperty.PropertyName) e.PropertyName == Xamarin.Forms.Frame.CornerRadiusProperty.PropertyName)
SetupLayer (); SetupLayer ();
@ -49,13 +49,13 @@ namespace Ooui.Forms.Renderers
//Layer.ShadowOpacity = 0; //Layer.ShadowOpacity = 0;
} }
if (Element.OutlineColor == Xamarin.Forms.Color.Default) { if (Element.BorderColor == Xamarin.Forms.Color.Default) {
Layer.BorderColor = Colors.Clear; Layer.BorderColor = Colors.Clear;
Layer.BorderWidth = 1; Layer.BorderWidth = 1;
Layer.BorderStyle = "none"; Layer.BorderStyle = "none";
} }
else { else {
Layer.BorderColor = Element.OutlineColor.ToOouiColor (Colors.Clear); Layer.BorderColor = Element.BorderColor.ToOouiColor (Colors.Clear);
Layer.BorderWidth = 1; Layer.BorderWidth = 1;
Layer.BorderStyle = "solid"; Layer.BorderStyle = "solid";
} }

View File

@ -9,7 +9,7 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.0" /> <PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.0" />
<PackageReference Include="Xamarin.Forms" Version="2.5.0.122203" /> <PackageReference Include="Xamarin.Forms" Version="3.0.0.482510" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View File

@ -30,8 +30,6 @@ msbuild
dotnet run --project Samples/Samples.csproj --no-build dotnet run --project Samples/Samples.csproj --no-build
``` ```
*(There is currently an issue with Xamarin.Forms and building from the dotnet cli, so for now we use the msbuild command and then set the --no-build flag on dotnet run but this will eventually change when the issue is resolved.)*
This will open the default starting page for the Samples. Now point your browser at [http://localhost:8080/shared-button](http://localhost:8080/shared-button) This will open the default starting page for the Samples. Now point your browser at [http://localhost:8080/shared-button](http://localhost:8080/shared-button)
You should see a button that tracks the number of times it was clicked. The source code for that button is shown in the example below. You should see a button that tracks the number of times it was clicked. The source code for that button is shown in the example below.

View File

@ -10,7 +10,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Xamarin.Forms" Version="2.5.0.122203" /> <PackageReference Include="Xamarin.Forms" Version="3.0.0.482510" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>