1

I have implemented the uwp loader in my xaml page to prevent the user interaction.

 <ProgressRing x:Name="loader"  Width="70" Height="70" Foreground="White"/>

but the problem is controller actions still working which allows the user interactions.Is there any possibility for preventing the controller actions while the loader is working?

Haritha Es
  • 185
  • 3
  • 11
  • Also you should consider calling Progress Ring asynchronously and disable it when you dont need it. – Venkat Nov 15 '18 at 15:53

1 Answers1

0

Progress ring is only a visual indicator for user that there is some longer action taking place. It does not prevent him from doing anything.

You are too unspecific with your question, but there are many ways of suppressing user input depending on your aproach to handling gamepad.

You can, for example set IsEnabled attribute for the whole page to false (works only for XAML elements).

You can detach event handlers for keydown event.

Or you can create a boolean variable (e.g. canplay) which you set to to false whenever you want to suppress user input, and in the function when you processing gamepad buttons you can check its value:

if (canplay)
{
    //process gamepad buttons
}
Mailosz
  • 131
  • 1
  • 9