Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
ManipulationDrawer demo main page code behind
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