13167066551
Topic Author
Posts: 1
Joined: 24 Nov 2019, 07:41

How to block a mouse event when downloading?

19 Mar 2020, 02:54

How to block a mouse event when downloading?
 
User avatar
sfernandez
Site Admin
Posts: 1912
Joined: 22 Dec 2011, 19:20

Re: How to block a mouse event when downloading?

19 Mar 2020, 21:08

It depends at what level you want to handle this, but there is a simple and common way to avoid user interacting with the UI, just show a panel that intercepts all input over the normal controls:
<UserControl x:Class="Test.MainPage"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
  ...
  <Grid x:Name="LayoutRoot">
    <!-- application UI controls -->
    <Grid x:Name="DisableInput" Background="#80000000" Visibility="Collapsed"/>
    <ProgressBar x:Name="DownloadBar" Visibility="Collapsed" .../>
</UserControl>
When you want to disable input just set Visibility="Visible" for the "DisableInput" panel and it will catch all input.

Who is online

Users browsing this forum: Bing [Bot] and 2 guests