Skip to content

Commit b424119

Browse files
authored
Merge branch 'master' into u/vgromfeld/removeUnusedFields
2 parents 84a7995 + afed92f commit b424119

File tree

5 files changed

+6
-12
lines changed

5 files changed

+6
-12
lines changed

Microsoft.Toolkit.Uwp.SampleApp/SamplePages/RadialGauge/RadialGaugeCode.bind

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
MinAngle="@[MinAngle:Slider:210:0-360]"
2727
MaxAngle="@[MaxAngle:Slider:150:0-360]"
2828
Unit="units"
29+
ValueStringFormat="@[ValueStringFormat:String:N0]"
2930
NeedleWidth="@[NeedleWidth:Slider:4:1-10]"
3031
NeedleLength="@[NeedleLength:Slider:100:20-100]"
3132
TickLength="@[TickLength:Slider:10:0-30]"

Microsoft.Toolkit.Uwp.UI.Controls/RadialGauge/RadialGauge.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public class RadialGauge : RangeBase
8888
/// Identifies the ValueStringFormat dependency property.
8989
/// </summary>
9090
public static readonly DependencyProperty ValueStringFormatProperty =
91-
DependencyProperty.Register(nameof(ValueStringFormat), typeof(string), typeof(RadialGauge), new PropertyMetadata("N0"));
91+
DependencyProperty.Register(nameof(ValueStringFormat), typeof(string), typeof(RadialGauge), new PropertyMetadata("N0", (s, e) => OnValueChanged(s)));
9292

9393
/// <summary>
9494
/// Identifies the TickSpacing dependency property.

Microsoft.Toolkit.Uwp.UI.Controls/RadialGauge/RadialGauge.xaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@
108108
FontSize="20"
109109
FontWeight="SemiBold"
110110
Foreground="{TemplateBinding Foreground}"
111-
Text="{TemplateBinding Value}"
112111
TextAlignment="Center" />
113112
<TextBlock Margin="0"
114113
FontSize="16"

Microsoft.Toolkit.Uwp/Deferred/EventHandlerExtensions.cs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
// See the LICENSE file in the project root for more information.
44

55
using System;
6-
using System.Collections.Generic;
76
using System.Linq;
8-
using System.Text;
97
using System.Threading;
108
using System.Threading.Tasks;
119

@@ -16,8 +14,6 @@ namespace Microsoft.Toolkit.Uwp.Deferred
1614
/// </summary>
1715
public static class EventHandlerExtensions
1816
{
19-
private static readonly Task CompletedTask = Task.FromResult(0);
20-
2117
/// <summary>
2218
/// Use to invoke an async <see cref="EventHandler{TEventArgs}"/> using <see cref="DeferredEventArgs"/>.
2319
/// </summary>
@@ -46,7 +42,7 @@ public static Task InvokeAsync<T>(this EventHandler<T> eventHandler, object send
4642
{
4743
if (eventHandler == null)
4844
{
49-
return CompletedTask;
45+
return Task.CompletedTask;
5046
}
5147

5248
var tasks = eventHandler.GetInvocationList()
@@ -59,7 +55,7 @@ public static Task InvokeAsync<T>(this EventHandler<T> eventHandler, object send
5955

6056
var deferral = eventArgs.GetCurrentDeferralAndReset();
6157

62-
return deferral?.WaitForCompletion(cancellationToken) ?? CompletedTask;
58+
return deferral?.WaitForCompletion(cancellationToken) ?? Task.CompletedTask;
6359
})
6460
.ToArray();
6561

Microsoft.Toolkit.Uwp/Deferred/TypedEventHandlerExtensions.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ namespace Microsoft.Toolkit.Uwp.Deferred
1515
/// </summary>
1616
public static class TypedEventHandlerExtensions
1717
{
18-
private static readonly Task CompletedTask = Task.FromResult(0);
19-
2018
/// <summary>
2119
/// Use to invoke an async <see cref="TypedEventHandler{TSender, TResult}"/> using <see cref="DeferredEventArgs"/>.
2220
/// </summary>
@@ -47,7 +45,7 @@ public static Task InvokeAsync<S, R>(this TypedEventHandler<S, R> eventHandler,
4745
{
4846
if (eventHandler == null)
4947
{
50-
return CompletedTask;
48+
return Task.CompletedTask;
5149
}
5250

5351
var tasks = eventHandler.GetInvocationList()
@@ -60,7 +58,7 @@ public static Task InvokeAsync<S, R>(this TypedEventHandler<S, R> eventHandler,
6058

6159
var deferral = eventArgs.GetCurrentDeferralAndReset();
6260

63-
return deferral?.WaitForCompletion(cancellationToken) ?? CompletedTask;
61+
return deferral?.WaitForCompletion(cancellationToken) ?? Task.CompletedTask;
6462
})
6563
.ToArray();
6664

0 commit comments

Comments
 (0)