Skip to content

Instantly share code, notes, and snippets.

@kw0006667
Created December 4, 2012 15:13
Show Gist options
  • Save kw0006667/4205029 to your computer and use it in GitHub Desktop.
Save kw0006667/4205029 to your computer and use it in GitHub Desktop.
在剛新增的頁面裡,增加移入的動畫
const int ContentAnimationOffset = 100;
public SettingPage()
{
this.InitializeComponent();
FlyoutContent.Transitions = new Windows.UI.Xaml.Media.Animation.TransitionCollection();
FlyoutContent.Transitions.Add(new Windows.UI.Xaml.Media.Animation.EntranceThemeTransition()
{
FromHorizontalOffset = (SettingsPane.Edge == SettingsEdgeLocation.Right) ? ContentAnimationOffset : (ContentAnimationOffset * -1)
});
}
private void BackClicked(object sender, RoutedEventArgs e)
{
Popup parent = this.Parent as Popup;
if (parent != null)
parent.IsOpen = false;
if (Windows.UI.ViewManagement.ApplicationView.Value != Windows.UI.ViewManagement.ApplicationViewState.Snapped)
SettingsPane.Show();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment