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

Commit

Permalink
fixes #11471 #11472
Browse files Browse the repository at this point in the history
  • Loading branch information
memu8 committed Jul 22, 2020
1 parent a7784e6 commit 2e9e747
Show file tree
Hide file tree
Showing 23 changed files with 106 additions and 81 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<PropertyGroup Condition=" '$(Configuration)'=='Debug' ">
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<PropertyGroup Condition="'$(Use2017)' == 'true'">
<PropertyGroup Condition="'$(Use2017)' == 'true'">
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<OutputPath>bin\$(Configuration)\$(TargetFramework)</OutputPath>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>tizen40</TargetFramework>
<TargetFrameworkIdentifier>Tizen</TargetFrameworkIdentifier>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<AssemblyName>Xamarin.Forms.Platform</AssemblyName>
<DefineConstants>TIZEN4_0</DefineConstants>
<OutputType>Library</OutputType>
Expand Down
2 changes: 1 addition & 1 deletion Xamarin.Forms.Build.Tasks/Xamarin.Forms.Build.Tasks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
</Target>

<Target Name="_StrongName" AfterTargets="Build" DependsOnTargets="_SetSnExe" Condition="'$(TargetPath)' != ''" Inputs="$(TargetPath)" Outputs="$(IntermediateOutputPath)Sn.stamp">
<Exec Command='"$(SnExe)" -R $(TargetPath) ..\xamarin.forms.snk' Condition=" '$(SignAssembly)' == 'true' " />
<Exec Command="&quot;$(SnExe)&quot; -R $(TargetPath) ..\xamarin.forms.snk" Condition=" '$(SignAssembly)' == 'true' " />
</Target>

<Target Name="_CopyToNuspecDir" AfterTargets="_StrongName;Build">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Xamarin.Forms.Controls\Xamarin.Forms.Controls.csproj">
<Project>{cb9c96ce-125c-4a68-b6a1-c3ff1fbf93e1}</Project>
<Project>{EC110FB6-FD6F-40F2-89F7-3FB9379CCE2E}</Project>
<Name>Xamarin.Forms.Controls</Name>
</ProjectReference>
<ProjectReference Include="..\Xamarin.Forms.CustomAttributes\Xamarin.Forms.CustomAttributes.csproj">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Xamarin.Forms.Controls\Xamarin.Forms.Controls.csproj">
<Project>{cb9c96ce-125c-4a68-b6a1-c3ff1fbf93e1}</Project>
<Project>{EC110FB6-FD6F-40F2-89F7-3FB9379CCE2E}</Project>
<Name>Xamarin.Forms.Controls</Name>
</ProjectReference>
<ProjectReference Include="..\Xamarin.Forms.Core\Xamarin.Forms.Core.csproj">
Expand All @@ -124,7 +124,7 @@
<Name>Xamarin.Forms.Maps</Name>
</ProjectReference>
<ProjectReference Include="..\Xamarin.Forms.Platform.GTK\Xamarin.Forms.Platform.GTK.csproj">
<Project>{1f058504-62f9-4279-ac8f-16738e0f4417}</Project>
<Project>{0D497738-2598-431D-8CAF-8FBF3D9F99EC}</Project>
<Name>Xamarin.Forms.Platform.GTK</Name>
</ProjectReference>
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Xamarin.Forms.Controls\Xamarin.Forms.Controls.csproj">
<Project>{CB9C96CE-125C-4A68-B6A1-C3FF1FBF93E1}</Project>
<Project>{EC110FB6-FD6F-40F2-89F7-3FB9379CCE2E}</Project>
<Name>Xamarin.Forms.Controls</Name>
</ProjectReference>
<ProjectReference Include="..\Xamarin.Forms.Core\Xamarin.Forms.Core.csproj">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>tizen40</TargetFramework>
<TargetFrameworkIdentifier>Tizen</TargetFrameworkIdentifier>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<iOSPlatform Condition=" '$(iOSPlatform)' == '' ">iPhone</iOSPlatform>
<Platform Condition=" '$(Platform)' == '' ">$(iOSPlatform)</Platform>
<Platform Condition=" '$(Platform)' == '' ">iPhoneSimulator</Platform>
<ProjectGuid>{C7131F14-274F-4B55-ACA9-E81731AD012F}</ProjectGuid>
<ProjectTypeGuids>{FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<OutputType>Exe</OutputType>
Expand Down Expand Up @@ -149,7 +149,7 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Xamarin.Forms.Controls\Xamarin.Forms.Controls.csproj">
<Project>{cb9c96ce-125c-4a68-b6a1-c3ff1fbf93e1}</Project>
<Project>{EC110FB6-FD6F-40F2-89F7-3FB9379CCE2E}</Project>
<Name>Xamarin.Forms.Controls</Name>
</ProjectReference>
<ProjectReference Include="..\Xamarin.Forms.Platform.iOS.UnitTests\Xamarin.Forms.Platform.iOS.UnitTests.csproj">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="_CopyXamarinUITestFiles" AfterTargets="Build">
<ItemGroup>
<_XamarinUITestFiles Include="$(NuGetPackageRoot)Xamarin.UITest\%(Version)\**" Condition="@(PackageReference -> '%(Identity)') == 'Xamarin.UITest'" InProject="False" />
<_XamarinUITestFiles Include="$(NuGetPackageRoot)Xamarin.UITest\%(Version)\**" Condition="@(PackageReference -&gt; '%(Identity)') == 'Xamarin.UITest'" InProject="False" />
</ItemGroup>
<Copy SourceFiles="@(_XamarinUITestFiles)" DestinationFolder="$(SolutionDir)packages\Xamarin.UITest.AnyVersion\%(RecursiveDir)" ContinueOnError="true" Retries="0" />
</Target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="_CopyXamarinUITestFiles" AfterTargets="Build">
<ItemGroup>
<_XamarinUITestFiles Include="$(NuGetPackageRoot)Xamarin.UITest\%(Version)\**" Condition="@(PackageReference -> '%(Identity)') == 'Xamarin.UITest'" InProject="False" />
<_XamarinUITestFiles Include="$(NuGetPackageRoot)Xamarin.UITest\%(Version)\**" Condition="@(PackageReference -&gt; '%(Identity)') == 'Xamarin.UITest'" InProject="False" />
</ItemGroup>
<Copy SourceFiles="@(_XamarinUITestFiles)" DestinationFolder="$(SolutionDir)packages\Xamarin.UITest.AnyVersion\%(RecursiveDir)" ContinueOnError="true" Retries="0" />
</Target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
</Target>
<Target Name="_CopyXamarinUITestFiles" AfterTargets="Build">
<ItemGroup>
<_XamarinUITestFiles Include="$(NuGetPackageRoot)Xamarin.UITest\%(Version)\**" Condition="@(PackageReference -> '%(Identity)') == 'Xamarin.UITest'" InProject="False" />
<_XamarinUITestFiles Include="$(NuGetPackageRoot)Xamarin.UITest\%(Version)\**" Condition="@(PackageReference -&gt; '%(Identity)') == 'Xamarin.UITest'" InProject="False" />
</ItemGroup>
<Copy SourceFiles="@(_XamarinUITestFiles)" DestinationFolder="$(SolutionDir)packages\Xamarin.UITest.AnyVersion\%(RecursiveDir)" ContinueOnError="true" Retries="0" />
</Target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Target Name="_CopyXamarinUITestFiles" AfterTargets="Build">
<ItemGroup>
<_XamarinUITestFiles Include="$(NuGetPackageRoot)Xamarin.UITest\%(Version)\**" Condition="@(PackageReference -> '%(Identity)') == 'Xamarin.UITest'" InProject="False" />
<_XamarinUITestFiles Include="$(NuGetPackageRoot)Xamarin.UITest\%(Version)\**" Condition="@(PackageReference -&gt; '%(Identity)') == 'Xamarin.UITest'" InProject="False" />
</ItemGroup>
<Copy SourceFiles="@(_XamarinUITestFiles)" DestinationFolder="$(SolutionDir)packages\Xamarin.UITest.AnyVersion\%(RecursiveDir)" ContinueOnError="true" Retries="0" />
</Target>
Expand Down
5 changes: 2 additions & 3 deletions Xamarin.Forms.Maps.Android/Xamarin.Forms.Maps.Android.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<PropertyGroup Condition=" '$(Configuration)'=='Debug' ">
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<PropertyGroup Condition="'$(Use2017)' == 'true'">
<PropertyGroup Condition="'$(Use2017)' == 'true'">
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<OutputPath>bin\$(Configuration)\$(TargetFramework)</OutputPath>
</PropertyGroup>
Expand All @@ -27,8 +27,7 @@
<PackageReference Include="Xamarin.AndroidX.Lifecycle.LiveData" Version="2.1.0.1" />
<PackageReference Include="Xamarin.Google.Android.Material" Version="1.0.0.1" />
<PackageReference Include="Xamarin.AndroidX.Legacy.Support.V4" Version="1.0.0.1" />
<PackageReference Include="Xamarin.AndroidX.Migration">
<Version>1.0.0.1</Version>
<PackageReference Include="Xamarin.AndroidX.Migration" Version="1.0.0.1">
</PackageReference>
</ItemGroup>
<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion Xamarin.Forms.Maps.GTK/Xamarin.Forms.Maps.GTK.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
<Name>Xamarin.Forms.Maps</Name>
</ProjectReference>
<ProjectReference Include="..\Xamarin.Forms.Platform.GTK\Xamarin.Forms.Platform.GTK.csproj">
<Project>{1f058504-62f9-4279-ac8f-16738e0f4417}</Project>
<Project>{0D497738-2598-431D-8CAF-8FBF3D9F99EC}</Project>
<Name>Xamarin.Forms.Platform.GTK</Name>
</ProjectReference>
</ItemGroup>
Expand Down
2 changes: 0 additions & 2 deletions Xamarin.Forms.Maps.Tizen/Xamarin.Forms.Maps.Tizen.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

<PropertyGroup>
<TargetFramework>tizen40</TargetFramework>
<TargetFrameworkIdentifier>Tizen</TargetFrameworkIdentifier>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
</PropertyGroup>

<ItemGroup>
Expand Down
3 changes: 3 additions & 0 deletions Xamarin.Forms.Maps.UWP/Xamarin.Forms.Maps.UWP.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,7 @@
<ProjectReference Include="..\Xamarin.Forms.Platform.UAP\Xamarin.Forms.Platform.UAP.csproj">
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Remove="obj\Debug\netstandard2.0\GitInfo.cache" />
</ItemGroup>
</Project>
6 changes: 3 additions & 3 deletions Xamarin.Forms.Maps.WPF/Xamarin.Forms.Maps.WPF.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Xamarin.Forms.Core\Xamarin.Forms.Core.csproj" />
<ProjectReference Include="..\Xamarin.Forms.Maps\Xamarin.Forms.Maps.csproj"/>
<ProjectReference Include="..\Xamarin.Forms.Platform.WPF\Xamarin.Forms.Platform.WPF.csproj"/>
<ProjectReference Include="..\Xamarin.Forms.Maps\Xamarin.Forms.Maps.csproj" />
<ProjectReference Include="..\Xamarin.Forms.Platform.WPF\Xamarin.Forms.Platform.WPF.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Maps.MapControl.WPF" Version="1.0.0.3" />
<Reference Include="System.Device"/>
<Reference Include="System.Device" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<PropertyGroup Condition=" '$(Configuration)'=='Debug' ">
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<PropertyGroup Condition="'$(Use2017)' == 'true'">
<PropertyGroup Condition="'$(Use2017)' == 'true'">
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<OutputPath>bin\$(Configuration)\$(TargetFramework)</OutputPath>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

<PropertyGroup>
<TargetFramework>tizen40</TargetFramework>
<TargetFrameworkIdentifier>Tizen</TargetFrameworkIdentifier>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<RootNamespace>Xamarin.Forms.Material.Tizen</RootNamespace>
<AssemblyName>Xamarin.Forms.Material</AssemblyName>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<PropertyGroup Condition=" '$(Configuration)'=='Debug' ">
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<PropertyGroup Condition="'$(Use2017)' == 'true'">
<PropertyGroup Condition="'$(Use2017)' == 'true'">
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<OutputPath>bin\$(Configuration)\$(TargetFramework)</OutputPath>
</PropertyGroup>
Expand All @@ -26,14 +26,12 @@
<PackageReference Include="Xamarin.Firebase.AppIndexing" Version="71.1602.0" />
<PackageReference Include="Xamarin.Android.Support.v4" Version="28.0.0.3" />
<ProjectReference Include="..\Xamarin.Forms.Core\Xamarin.Forms.Core.csproj">
<Name>Xamarin.Forms.Core</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'MonoAndroid10.0'">
<PackageReference Include="Xamarin.AndroidX.Lifecycle.LiveData" Version="2.1.0.1" />
<PackageReference Include="Xamarin.AndroidX.Legacy.Support.V4" Version="1.0.0.1" />
<PackageReference Include="Xamarin.AndroidX.Migration">
<Version>1.0.0.1</Version>
<PackageReference Include="Xamarin.AndroidX.Migration" Version="1.0.0.1">
</PackageReference>
</ItemGroup>
<ItemGroup>
Expand Down
63 changes: 48 additions & 15 deletions Xamarin.Forms.Platform.UAP/DatePickerRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -143,26 +143,25 @@ void UpdateDate(DateTime date)
if (Control != null)
Control.Date = new DateTimeOffset(new DateTime(date.Ticks, DateTimeKind.Unspecified));

UpdateDay();
UpdateMonth();
UpdateYear();
}

void UpdateMonth()
{
Control.MonthVisible = true;
Control.YearVisible = true;
Control.DayVisible = true;
if (Element.Format.Equals("") || Element.Format.Equals("d"))
{
Control.MonthFormat = "month";
Control.YearFormat = "year";
Control.DayFormat = "day";
}
else if (Element.Format.Equals("D"))
{
Control.MonthFormat = "month.full";
Control.YearFormat = "year.full";
Control.DayFormat = "dayofweek.full";
}
else
{
var month = Element.Format.Count(x => x == 'M');
var year = Element.Format.Count(x => x == 'y');
var day = Element.Format.Count(x => x == 'd');
if (month == 0)
Control.MonthVisible = false;
else if (month <= 2)
Expand All @@ -171,23 +170,57 @@ void UpdateDate(DateTime date)
Control.MonthFormat = "month.abbreviated";
else
Control.MonthFormat = "month.full";
if (year == 0)
Control.YearVisible = false;
else if (year <= 2)
Control.YearFormat = "year.abbreviated";
else
Control.YearFormat = "year.full";
}
}

void UpdateDay()
{
Control.DayVisible = true;
if (Element.Format.Equals("") || Element.Format.Equals("d"))
{
Control.DayFormat = "day";
}
else if (Element.Format.Equals("D"))
{
Control.DayFormat = "dayofweek.full";
}
else
{
var day = Element.Format.Count(x => x == 'd');
if (day == 0)
Control.DayVisible = false;
else if (day == 3)
Control.DayFormat = "dayofweek.abbreviated";
Control.DayFormat = "day dayofweek.abbreviated";
else if (day == 4)
Control.DayFormat = "dayofweek.full";
else
Control.DayFormat = "day";
}
}

void UpdateYear()
{
Control.YearVisible = true;
if (Element.Format.Equals("") || Element.Format.Equals("d"))
{
Control.YearFormat = "year";
}
else if (Element.Format.Equals("D"))
{
Control.YearFormat = "year.full";
}
else
{
var year = Element.Format.Count(x => x == 'y');
if (year == 0)
Control.YearVisible = false;
else if (year <= 2)
Control.YearFormat = "year.abbreviated";
else
Control.YearFormat = "year.full";
}
}

void UpdateFlowDirection()
{
Control.UpdateFlowDirection(Element);
Expand Down
3 changes: 3 additions & 0 deletions Xamarin.Forms.Platform.UAP/Xamarin.Forms.Platform.UAP.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -123,4 +123,7 @@
<PackageReference Include="Win2D.uwp" Condition="'$(OS)' == 'Windows_NT'" Version="1.20.0">
</PackageReference>
</ItemGroup>
<ItemGroup>
<None Remove="obj\Debug\netstandard2.0\GitInfo.cache" />
</ItemGroup>
</Project>
Loading

0 comments on commit 2e9e747

Please sign in to comment.