由于改变能见度在DevExpress的技术支持团队我有一个解决我的问题。
首先,需要时间来加载我有我的包裹电网在ContentControl中
<ContentControl Visibility="Collapsed" Name="Content">
<!-- Grid in here -->
</ContentControl>
然后我说,我将使用以显示一个TextBlock“载入中...”我的页面在页面上。我称这个控制指标。
<TextBlock x:Name="indicator" Text="Loading..." />
我已附加了以下方法,其使用定时器
void MainPage_Loaded(object sender, RoutedEventArgs e)
{
indicator.Visibility = Windows.UI.Xaml.Visibility.Visible;
DispatcherTimer t = new DispatcherTimer { Interval = TimeSpan.FromSeconds(1) };
t.Tick += (dd, ee) =>
{
t.Stop();
Content.Visibility = Windows.UI.Xaml.Visibility.Visible;
};
t.Start();
}
然后当gridcontrol加载我隐藏指示符的TextBlock
void gridControl_Loaded(object sender, RoutedEventArgs e)
{
indicator.Visibility = Windows.UI.Xaml.Visibility.Collapsed;
}
此页面的加载的事件为我完美工作。我无法使用Windows 8 ProgressBar控件,因为动画加载在加载网格的同一线程上 - 但我很高兴有任何指示器。
也感谢Brian Stump指引我走向正确的方向。
你会考虑使用gridview吗? 取决于您的数据模型,但gridview内置了UI虚拟化策略来递增加载对象。 – 2014-08-29 12:35:47