protected LayoutAwarePage()
{
Loaded += (sender, e) =>
{
frame = (Frame)Window.Current.Content;
StartLayoutUpdates(sender, e);
if (ActualHeight == Window.Current.Bounds.Height && ActualWidth == Window.Current.Bounds.Width)
{
Window.Current.CoreWindow.Dispatcher.AcceleratorKeyActivated += CoreDispatcher_AcceleratorKeyActivated;
Window.Current.CoreWindow.PointerPressed += CoreWindow_PointerPressed;
}
};
Unloaded += (sender, e) =>
{
StopLayoutUpdates(sender, e);
Window.Current.CoreWindow.Dispatcher.AcceleratorKeyActivated -= CoreDispatcher_AcceleratorKeyActivated;
Window.Current.CoreWindow.PointerPressed -= CoreWindow_PointerPressed;
};
}