Created
December 4, 2012 15:13
-
-
Save kw0006667/4205029 to your computer and use it in GitHub Desktop.
在剛新增的頁面裡,增加移入的動畫
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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