Merge branch '4.3.0' into 4.4.0

This commit is contained in:
Stephane Delcroix 2019-11-18 11:39:51 +01:00
Родитель 43b06078d8 88ef742003
Коммит c82d605e6c
5 изменённых файлов: 123 добавлений и 11 удалений

Просмотреть файл

@ -1,22 +1,24 @@
<Project>
<PropertyGroup>
<NightlyTag>nightly</NightlyTag>
<RegexPre>pre\d</RegexPre>
</PropertyGroup>
<PropertyGroup>
<GitBranch Condition="'$(SYSTEM_PULLREQUEST_TARGETBRANCH)' != ''">$(SYSTEM_PULLREQUEST_TARGETBRANCH)</GitBranch>
<GitBranch Condition="'$(SYSTEM_PULLREQUEST_TARGETBRANCH)' == '' and '$(BUILD_SOURCEBRANCHNAME)' != ''">$(BUILD_SOURCEBRANCHNAME)</GitBranch>
</PropertyGroup>
<PropertyGroup>
<GitSemVerLabel Condition="$(CI) and '$(BUILD_REASON)' == 'Schedule'">$(NightlyTag)</GitSemVerLabel>
<GitSemVerDashLabel Condition="$(CI) and '$(BUILD_REASON)' == 'Schedule'">-$(GitSemVerLabel)</GitSemVerDashLabel>
</PropertyGroup>
<Target Name="SetVersions"
BeforeTargets="PrepareForBuild;GetAssemblyVersion;GetPackageVersion;Pack"
DependsOnTargets="GitVersion"
Returns="$(Version)"
>
<PropertyGroup>
<PreOut>$([System.Text.RegularExpressions.Regex]::Match($(GitTag), $(RegexPre)))</PreOut>
<GitSemVerLabel Condition=" '$(GitTag)' != '' and '$(GitTag)' == '$(GitBranch)' and $([System.Text.RegularExpressions.Regex]::IsMatch('$(GitTag)', $(RegexPre))) ">$(PreOut)</GitSemVerLabel>
<GitSemVerLabel Condition="$(CI) and '$(BUILD_REASON)' == 'Schedule'">$(NightlyTag)</GitSemVerLabel>
<GitSemVerDashLabel Condition="'$(GitSemVerLabel)' != ''" >-$(GitSemVerLabel)</GitSemVerDashLabel>
</PropertyGroup>
<ItemGroup>
<VersionMetadata Include="$(GitCommits)" Condition="'$(GitSemVerDashLabel)' == ''" />
@ -34,7 +36,11 @@
<VersionMetadataPlusLabel Condition="'$(VersionMetadataLabel)' != ''">+$(VersionMetadataLabel)</VersionMetadataPlusLabel>
<Version>$(GitBaseVersionMajor).$(GitBaseVersionMinor).$(GitBaseVersionPatch)</Version>
<PackageVersion>$(GitSemVerMajor).$(GitSemVerMinor).$(GitSemVerPatch)$(GitSemVerDashLabel)$(VersionMetadataPlusLabel)</PackageVersion>
<PackageVersion Condition="$(CI)">$(GitSemVerMajor).$(GitSemVerMinor).$(GitBaseVersionPatch).$(BUILDVERSION)$(GitSemVerDashLabel)$(VersionMetadataPlusLabel)</PackageVersion>
<PackageVersion Condition="$(CI) and '$(GitBaseVersion)' == '4.2.0'">$(GitSemVerMajor).$(GitSemVerMinor).$(GitBaseVersionPatch).$(BUILDVERSION42)$(GitSemVerDashLabel)$(VersionMetadataPlusLabel)</PackageVersion>
<PackageVersion Condition="$(CI) and '$(GitBaseVersion)' == '4.3.0'">$(GitSemVerMajor).$(GitSemVerMinor).$(GitBaseVersionPatch).$(BUILDVERSION43)$(GitSemVerDashLabel)$(VersionMetadataPlusLabel)</PackageVersion>
<PackageVersion Condition="$(CI) and '$(GitBaseVersion)' == '4.4.0'">$(GitSemVerMajor).$(GitSemVerMinor).$(GitBaseVersionPatch).$(BUILDVERSION44)$(GitSemVerDashLabel)$(VersionMetadataPlusLabel)</PackageVersion>
</PropertyGroup>
<PropertyGroup>

Просмотреть файл

@ -0,0 +1,99 @@
using System;
using System.Collections.Generic;
using System.Text;
using Xamarin.Forms.CustomAttributes;
using Xamarin.Forms.Internals;
namespace Xamarin.Forms.Controls.Issues
{
[Preserve(AllMembers = true)]
[Issue(IssueTracker.Github, 7361, "[UWP] Stepper display error when using Slider", PlatformAffected.UWP)]
public class Issue7361 : TestContentPage
{
Slider TheSlider;
Stepper TheStepper;
Label ValueLabel;
public Issue7361()
{
Title = "Issue 7361";
}
protected override void Init()
{
StackLayout layout = new StackLayout();
layout.Orientation = StackOrientation.Vertical;
var instructions = new Label
{
Margin = new Thickness(6),
Text = "Slide slider to the extreme Right and Left, check that the Stepper to the right's +/- buttons work as expected, " +
"becoming disabled at the Max and Min positions of the Slider, and then enabled again as the Slider moves towards the center."
};
StackLayout controlsLayout = new StackLayout();
controlsLayout.Orientation= StackOrientation.Horizontal;
controlsLayout.HorizontalOptions = LayoutOptions.FillAndExpand;
TheSlider = new Slider
{
Maximum = 100,
Minimum = 1,
HorizontalOptions = LayoutOptions.FillAndExpand,
MinimumTrackColor = Color.LightPink,
MaximumTrackColor = Color.LightPink
};
controlsLayout.Children.Add(TheSlider);
TheStepper = new Stepper
{
Maximum = 100,
Minimum = 1,
Increment = 1
};
controlsLayout.Children.Add(TheStepper);
StackLayout labelLayout = new StackLayout();
labelLayout.Orientation = StackOrientation.Horizontal;
labelLayout.HorizontalOptions = LayoutOptions.FillAndExpand;
Label valueHeaderLabel = new Label
{
Text = "Value:",
FontSize = Device.GetNamedSize(NamedSize.Large, typeof(Label))
};
labelLayout.Children.Add(valueHeaderLabel);
ValueLabel = new Label
{
Text = "",
FontSize = Device.GetNamedSize(NamedSize.Large, typeof(Label))
};
labelLayout.Children.Add(ValueLabel);
layout.Children.Add(instructions);
layout.Children.Add(controlsLayout);
layout.Children.Add(labelLayout);
Content = layout;
TheSlider.Value = 50;
TheStepper.Value = 50;
TheSlider.ValueChanged += SliderChanged;
TheStepper.ValueChanged += StepperChanged;
}
private void SliderChanged(object sender, ValueChangedEventArgs e)
{
TheStepper.Value = e.NewValue;
ValueLabel.Text = e.NewValue.ToString();
}
private void StepperChanged(object sender, ValueChangedEventArgs e)
{
TheSlider.Value = e.NewValue;
ValueLabel.Text = e.NewValue.ToString();
}
}
}

Просмотреть файл

@ -38,6 +38,7 @@
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)Issue7253.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Issue7581.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Issue7361.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Issue7621.xaml.cs">
<SubType>Code</SubType>
</Compile>

Просмотреть файл

@ -223,17 +223,17 @@ namespace Xamarin.Forms.Platform.UWP
double increment = Increment;
if (_plus != null)
{
if (value + increment > Maximum)
if (value + increment > Maximum && _plusStateCache is null)
_plusStateCache = PseudoDisable(_plus);
else
else if (value + increment <= Maximum)
PsuedoEnable(_plus, ref _plusStateCache);
}
if (_minus != null)
{
if (value - increment < Minimum)
if (value - increment < Minimum && _minusStateCache is null)
_minusStateCache = PseudoDisable(_minus);
else
else if (value - increment >= Minimum)
PsuedoEnable(_minus, ref _minusStateCache);
}
}

Просмотреть файл

@ -10,7 +10,13 @@ variables:
- name: SolutionFile
value: Xamarin.Forms.sln
- name: BuildVersion
value: $[counter('$(Build.SourceBranchName)_counter', 1)]
value: $[counter(variables['Build.SourceBranch'], 1)]
- name: BuildVersion42
value: $[counter('4.2.0', 910311)]
- name: BuildVersion43
value: $[counter('4.3.0', 991211)]
- name: BuildVersion44
value: $[counter('4.4.0', 991210)]
- name: NUGET_VERSION
value: 5.0.2
- name: DOTNET_SKIP_FIRST_TIME_EXPERIENCE