Windows store apps 如何重置页面加载时的单击
我有一个窗口商店应用程序。我尝试导航到一个页面,该页面正在加载一段时间(几秒钟)。该页面包含几个大图片,因此它会加载一段时间,尤其是在较弱的设备上。当我在加载页面时单击时出现问题-加载页面时将处理单击。若用户点击页面加载时按钮所在的位置,则会点击按钮Windows store apps 如何重置页面加载时的单击,windows-store-apps,windows-8.1,Windows Store Apps,Windows 8.1,我有一个窗口商店应用程序。我尝试导航到一个页面,该页面正在加载一段时间(几秒钟)。该页面包含几个大图片,因此它会加载一段时间,尤其是在较弱的设备上。当我在加载页面时单击时出现问题-加载页面时将处理单击。若用户点击页面加载时按钮所在的位置,则会点击按钮 如何关闭此功能?有没有办法在加载时重置单击?而不是在页面加载时重置单击,这可以通过更好的设计方法来解决 在页面加载时,显示一个不确定的进度条,一旦图像加载完成,隐藏进度条并显示实际屏幕 下面是一个通过将进度条放入 navigationHelper\
如何关闭此功能?有没有办法在加载时重置单击?而不是在页面加载时重置单击,这可以通过更好的设计方法来解决 在页面加载时,显示一个不确定的进度条,一旦图像加载完成,隐藏进度条并显示实际屏幕 下面是一个通过将进度条放入 navigationHelper\u LoadState(对象发送方,LoadStateEventArgs e)事件 加载图像后,您可以选择关闭此弹出窗口
//Progress Bar
ProgressBar bar = new ProgressBar();
bar.IsIndeterminate = true;
//Downloading Data text
TextBlock txt = new TextBlock();
txt.Text = "Downloading data...";
txt.FontSize = 17;
txt.Foreground = new SolidColorBrush(Colors.White);
txt.HorizontalAlignment = Windows.UI.Xaml.HorizontalAlignment.Center;
//This could take a few seconds
TextBlock txt2 = new TextBlock();
txt2.Text = "This could take a few seconds.";
txt2.FontSize = 17;
txt2.Foreground = new SolidColorBrush(Colors.White);
txt2.HorizontalAlignment = Windows.UI.Xaml.HorizontalAlignment.Center;
//Please do not close the application.
TextBlock txt3 = new TextBlock();
txt3.Text = "Please do not close the application.";
txt3.FontSize = 17;
txt3.Foreground = new SolidColorBrush(Colors.White);
txt3.HorizontalAlignment = Windows.UI.Xaml.HorizontalAlignment.Center;
StackPanel stk = new StackPanel();
stk.Children.Add(bar);
stk.Children.Add(txt);
stk.Children.Add(txt2);
stk.Children.Add(txt3);
stk.VerticalAlignment = Windows.UI.Xaml.VerticalAlignment.Center;
Grid contentGrid = new Grid();
contentGrid.Height = Window.Current.Bounds.Height;
contentGrid.Width = Window.Current.Bounds.Width;
// or from LayoutGrid
//contentGrid.Height = LayoutRoot.ActualHeight;
//contentGrid.Width = LayoutRoot.ActualWidth;
contentGrid.Width -= 40; // it seems that ContentDialog has some defaul margin
contentGrid.Children.Add(stk);
Popup dlg = new Popup();
dlg.Child = contentGrid;
SolidColorBrush color = new SolidColorBrush(Colors.Black);
color.Opacity = 0.7;
//dlg.Background = color;
dlg.IsOpen = true;