Created
January 10, 2017 23:18
-
-
Save LanceMcCarthy/acbf4f552c50864b239af109e1de727b to your computer and use it in GitHub Desktop.
ManipulationDrawer demo main page code behind
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
using Windows.UI.Xaml; | |
using Windows.UI.Xaml.Controls; | |
using Windows.UI.Xaml.Input; | |
using Windows.UI.Xaml.Media; | |
namespace DetailsDrawer | |
{ | |
public sealed partial class MainPage : Page | |
{ | |
public MainPage() | |
{ | |
this.InitializeComponent(); | |
} | |
private void HandleGrid_OnManipulationStarted(object sender, ManipulationStartedRoutedEventArgs e) | |
{ | |
var themeBrush = Application.Current.Resources["AppBarToggleButtonBackgroundCheckedPointerOver"] as SolidColorBrush; | |
if (themeBrush != null) | |
HandleGrid.Background = themeBrush; | |
} | |
private void HandleGrid_OnManipulationCompleted(object sender, ManipulationCompletedRoutedEventArgs e) | |
{ | |
var themeBrush = Application.Current.Resources["AppBarBorderThemeBrush"] as SolidColorBrush; | |
if (themeBrush != null) | |
HandleGrid.Background = themeBrush; | |
} | |
private void HandleGrid_OnManipulationDelta(object sender, ManipulationDeltaRoutedEventArgs e) | |
{ | |
DrawerContentGrid.Height = DrawerContentGrid.ActualHeight + -e.Delta.Translation.Y; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment