public SettingsFlyout()
{
this.DefaultStyleKey = typeof(SettingsFlyout);
_windowBounds = Window.Current.Bounds;
this.Loaded += OnLoaded;
_hostPopup = new Popup();
_hostPopup.ChildTransitions = new TransitionCollection();
_hostPopup.ChildTransitions.Add(new PaneThemeTransition() { Edge = (SettingsPane.Edge == SettingsEdgeLocation.Right) ? EdgeTransitionLocation.Right : EdgeTransitionLocation.Left });
_hostPopup.Closed += OnHostPopupClosed;
_hostPopup.IsLightDismissEnabled = true;
_hostPopup.Height = _windowBounds.Height;
_hostPopup.Child = this;
_hostPopup.SetValue(Canvas.TopProperty, 0);
this.Height = _windowBounds.Height;
}