question

FritzSwitzer-2766 avatar image
0 Votes"
FritzSwitzer-2766 asked ·

UWP FirstRunDialog Turn Off

I created an app using the Template Studio. It includes a FirstRunDialog feature.

Where can I programatically (in code-behind) turn on-off this dialog from appearing?

Using something like FirstRunDialog.Show=off as an example.

thanks

uwp
· 1
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello, may my answer solve your problem?

0 Votes 0 · ·

1 Answer

RichardZhang-MSFT avatar image
0 Votes"
RichardZhang-MSFT answered ·

Hello,​

Welcome to our Microsoft Q&A platform!

In path Services/FirstRunDisplayService.cs, there is code that displays FirstRunDialog:

 if (SystemInformation.IsFirstRun && !shown)
 {
     shown = true;
     var dialog = new FirstRunDialog();
     await dialog.ShowAsync();
 }

If you want to close it, you can use the code: dialog.Hide();

Thanks.

· Share
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.