Skip to content

Commit fc89232

Browse files
michael-hawkerSergio0694
authored andcommitted
Fix Surface Dial Sample Loading
Was trying to bind to non-DependencyProperties
1 parent 407d8fd commit fc89232

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

Microsoft.Toolkit.Uwp.SampleApp/Pages/SampleController.xaml.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,8 @@ protected override void OnNavigatedFrom(NavigationEventArgs e)
337337
{
338338
method.Invoke(SamplePage, new object[] { e });
339339
}
340+
341+
SamplePage = null;
340342
}
341343

342344
XamlCodeEditor = null;

Microsoft.Toolkit.Uwp.SampleApp/SamplePages/SurfaceDialTextbox/SurfaceDialTextboxCode.bind

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@
1616
Width="250">
1717
<ui:TextBoxExtensions.SurfaceDialOptions>
1818
<ui:SurfaceDialOptions
19-
StepValue="@[StepValue:DoubleSlider:1:0.1-10]"
20-
ForceMenuItem="@[ForceMenuItem:Bool:true]"
21-
EnableHapticFeedback="@[EnableHapticFeedback:Bool:true]"
22-
EnableMinMaxValue="@[EnableMinMaxValue:Bool:true]"
23-
MinValue="@[MinValue:DoubleSlider:0:0-100]"
24-
MaxValue="@[MaxValue:DoubleSlider:100:0-100]"
25-
Icon="@[Icon:Enum:RadialControllerMenuKnownIcon.Ruler]"
26-
EnableTapToNextControl="@[EnableTapToNextControl:Bool:true]"/>
19+
StepValue="1"
20+
ForceMenuItem="True"
21+
EnableHapticFeedback="True"
22+
EnableMinMaxValue="True"
23+
MinValue="0"
24+
MaxValue="100"
25+
Icon="Ruler"
26+
EnableTapToNextControl="True"/>
2727
</ui:TextBoxExtensions.SurfaceDialOptions>
2828
</TextBox>
2929
</StackPanel>

Microsoft.Toolkit.Uwp.UI/Extensions/TextBox/SurfaceDialOptions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public sealed class SurfaceDialOptions : DependencyObject
2626

2727
/// <summary>
2828
/// Gets or sets the default icon of the menu item that gets added.
29-
/// A user will most likely not see this.
29+
/// This will be visible if a user opens their Surface Dial menu by long-pressing the device.
3030
/// Defaults to <see cref="RadialControllerMenuKnownIcon.Ruler"/>.
3131
/// </summary>
3232
public RadialControllerMenuKnownIcon Icon { get; set; } = RadialControllerMenuKnownIcon.Ruler;

0 commit comments

Comments
 (0)