33// See the LICENSE file in the project root for more information.
44
55using System . Collections . Generic ;
6+ using Windows . Foundation ;
7+ using Windows . UI . Xaml . Automation ;
68using Windows . UI . Xaml . Automation . Peers ;
79using Windows . UI . Xaml . Automation . Provider ;
810
@@ -12,7 +14,7 @@ namespace Microsoft.Toolkit.Uwp.UI.Controls
1214 /// Exposes <see cref="RadialGauge"/> to Microsoft UI Automation.
1315 /// </summary>
1416 public class RadialGaugeAutomationPeer :
15- FrameworkElementAutomationPeer ,
17+ RangeBaseAutomationPeer ,
1618 IRangeValueProvider
1719 {
1820 /// <summary>
@@ -25,25 +27,25 @@ public RadialGaugeAutomationPeer(RadialGauge owner)
2527 }
2628
2729 /// <inheritdoc/>
28- public bool IsReadOnly => ! ( ( RadialGauge ) Owner ) . IsInteractive ;
30+ public new bool IsReadOnly => ! ( ( RadialGauge ) Owner ) . IsInteractive ;
2931
3032 /// <inheritdoc/>
31- public double LargeChange => ( ( RadialGauge ) Owner ) . StepSize ;
33+ public new double LargeChange => ( ( RadialGauge ) Owner ) . StepSize ;
3234
3335 /// <inheritdoc/>
34- public double Maximum => ( ( RadialGauge ) Owner ) . Maximum ;
36+ public new double Maximum => ( ( RadialGauge ) Owner ) . Maximum ;
3537
3638 /// <inheritdoc/>
37- public double Minimum => ( ( RadialGauge ) Owner ) . Minimum ;
39+ public new double Minimum => ( ( RadialGauge ) Owner ) . Minimum ;
3840
3941 /// <inheritdoc/>
40- public double SmallChange => ( ( RadialGauge ) Owner ) . StepSize ;
42+ public new double SmallChange => ( ( RadialGauge ) Owner ) . StepSize ;
4143
4244 /// <inheritdoc/>
43- public double Value => ( ( RadialGauge ) Owner ) . Value ;
45+ public new double Value => ( ( RadialGauge ) Owner ) . Value ;
4446
4547 /// <inheritdoc/>
46- public void SetValue ( double value )
48+ public new void SetValue ( double value )
4749 {
4850 ( ( RadialGauge ) Owner ) . Value = value ;
4951 }
@@ -58,7 +60,7 @@ protected override IList<AutomationPeer> GetChildrenCore()
5860 protected override string GetNameCore ( )
5961 {
6062 var gauge = ( RadialGauge ) Owner ;
61- return "radial gauge. " + ( string . IsNullOrWhiteSpace ( gauge . Unit ) ? "no unit specified. " : "unit " + gauge . Unit + ". " ) ;
63+ return "radial gauge. " + ( string . IsNullOrWhiteSpace ( gauge . Unit ) ? "no unit specified, " : "unit " + gauge . Unit + ", " ) + Value ;
6264 }
6365
6466 /// <inheritdoc/>
@@ -78,5 +80,15 @@ protected override AutomationControlType GetAutomationControlTypeCore()
7880 {
7981 return AutomationControlType . Custom ;
8082 }
83+
84+ /// <summary>
85+ /// Raises the property changed event for this AutomationPeer for the provided identifier.
86+ /// </summary>
87+ /// <param name="oldValue">Old value</param>
88+ /// <param name="newValue">New value</param>
89+ public void RaiseValueChangedEvent ( double oldValue , double newValue )
90+ {
91+ RaisePropertyChangedEvent ( RangeValuePatternIdentifiers . ValueProperty , PropertyValue . CreateDouble ( oldValue ) , PropertyValue . CreateDouble ( newValue ) ) ;
92+ }
8193 }
8294}
0 commit comments