【发布时间】:2020-04-23 18:03:13
【问题描述】:
我有类似幻灯片的东西这里是代码:
private int index;
private List<Type> pages = new List<Type>() { typeof(ChartWheaterPage), typeof(ChartServerPage), typeof(mitarbeiteronlinePage), typeof(MomentaneKundenPage), typeof(OutlookKalenderPage), typeof(fdösjf), typeof(ChartZielPage) };
public MainPage()
{
this.InitializeComponent();
var timer = new DispatcherTimer();
timer.Interval = TimeSpan.FromSeconds(20);
timer.Tick += Timer_Tick;
timer.Start();
}
private void Timer_Tick(object sender, object e)
{
grid_loading.Opacity = 0;
if (index == pages.Count)
{
index = 0;
}
this.contentFrame.Navigate(pages[index]);
index++;
}
}
但问题是我使用 Grafana,当我加载视图 ChartWheaterPage Grafana 加载 20-30 秒。有没有办法在启动时加载页面并显示它只加载一次
【问题讨论】: