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

Pcbender/update to current packages #234

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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 .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Makefile.in
*.DS_Store
*.sln.cache
*.suo
*.DotSettings
*.cache
*.pidb
*.userprefs
Expand Down
8 changes: 4 additions & 4 deletions Ooui.AspNetCore/Ooui.AspNetCore.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 @@ -9,12 +9,12 @@
<PackageProjectUrl>https://github.com/praeclarum/Ooui</PackageProjectUrl>
<PackageLicenseUrl>https://github.com/praeclarum/Ooui/blob/master/LICENSE</PackageLicenseUrl>
<RepositoryUrl>https://github.com/praeclarum/Ooui.git</RepositoryUrl>
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFramework>netcoreapp2.2</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.0.0" />
<PackageReference Include="Microsoft.AspNetCore.WebSockets" Version="2.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.WebSockets" Version="2.2.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Ooui\Ooui.csproj" />
Expand Down
2 changes: 1 addition & 1 deletion Ooui.Forms/Ooui.Forms.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Xamarin.Forms" Version="3.6.0.264807" />
<PackageReference Include="Xamarin.Forms" Version="4.0.0.497661" />
</ItemGroup>
<ItemGroup>
<Folder Include="Extensions\" />
Expand Down
4 changes: 2 additions & 2 deletions Ooui.Forms/Renderers/ButtonRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ protected override void OnElementPropertyChanged (object sender, PropertyChanged
UpdateFont ();
else if (e.PropertyName == Xamarin.Forms.Button.BorderWidthProperty.PropertyName || e.PropertyName == Xamarin.Forms.Button.CornerRadiusProperty.PropertyName || e.PropertyName == Xamarin.Forms.Button.BorderColorProperty.PropertyName)
UpdateBorder ();
else if (e.PropertyName == Xamarin.Forms.Button.ImageProperty.PropertyName)
else if (e.PropertyName == Xamarin.Forms.Button.ImageSourceProperty.PropertyName)
UpdateImage ();
}

Expand Down Expand Up @@ -113,7 +113,7 @@ void UpdateFont ()
async void UpdateImage ()
{
IImageSourceHandler handler;
FileImageSource source = Element.Image;
ImageSource source = Element.ImageSource;

if (source != null &&
(handler = Xamarin.Forms.Internals.Registrar.Registered.GetHandler<IImageSourceHandler>(source.GetType())) != null)
Expand Down
9 changes: 4 additions & 5 deletions Ooui.Forms/Renderers/LabelRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -145,14 +145,13 @@ void UpdateText ()
{
_perfectSizeValid = false;

var values = Element.GetValues (Xamarin.Forms.Label.FormattedTextProperty, Xamarin.Forms.Label.TextProperty, Xamarin.Forms.Label.TextColorProperty);
var formatted = values[0] as FormattedString;
if (formatted != null) {
Control.Text = (string)values[1];
var text = Element.GetValue(Xamarin.Forms.Label.TextProperty) as string;
if (Element.GetValue (Xamarin.Forms.Label.FormattedTextProperty) is FormattedString formatted) {
Control.Text = formatted.ToString();
isTextFormatted = true;
}
else {
Control.Text = (string)values[1];
Control.Text = text;
isTextFormatted = false;
}
}
Expand Down
9 changes: 4 additions & 5 deletions Ooui.Forms/Renderers/LinkLabelRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -131,14 +131,13 @@ void UpdateText ()
{
_perfectSizeValid = false;

var values = Element.GetValues (Xamarin.Forms.Label.FormattedTextProperty, Xamarin.Forms.Label.TextProperty, Xamarin.Forms.Label.TextColorProperty);
var formatted = values[0] as FormattedString;
if (formatted != null) {
Control.Text = (string)values[1];
var values = Element.GetValue (Xamarin.Forms.Label.FormattedTextProperty);
if (values is FormattedString formatted) {
Control.Text = formatted.ToString();
isTextFormatted = true;
}
else {
Control.Text = (string)values[1];
Control.Text = Element.GetValue (Xamarin.Forms.Label.TextProperty) as string;
isTextFormatted = false;
}
}
Expand Down
Loading