1

我有显示出来,并与过渡效果隐藏的菜单:完成过渡效果

Open

Closed

你看到的是你浏览到其他页面元素。

所以,当我浏览到其他网页我做的:

MenuButton.Tag = "MenuDisabled"; 
     VisualStateManager.GoToState(this, "HideMenu", true); 
     NavigationService.Navigate(new Uri("/AboutPageAuthorized.xaml", UriKind.Relative)); 

但它发生的导航工作比效果更快,所以你会看到它滑动,直到中间,然后快速dissapear - 它烦人。

有没有办法处理这种影响破的东西?

回答

0

添加延迟调用导航之前,您可以添加延迟using System.Timers 只需添加导航事件OnTimedEvent下,并根据您的需要调整计时器。

//Place the effect here 

// Create a timer with a ten second interval. 
aTimer = new System.Timers.Timer(10000); 

// Hook up the Elapsed event for the timer. 
aTimer.Elapsed += new ElapsedEventHandler(OnTimedEvent); 

// Set the Interval to 2 seconds (2000 milliseconds). 
aTimer.Interval = 2000; 
aTimer.Enabled = true; 

private static void OnTimedEvent(object source, ElapsedEventArgs e) 
{ 
    NavigationService.Navigate(new Uri("/AboutPageAuthorized.xaml", UriKind.Relative)); 
}