private void KeyboardService_Showing(InputPane sender, InputPaneVisibilityEventArgs args) { Forms9Patch.KeyboardService.OnVisiblityChange(KeyboardVisibilityChange.Shown); Height = InputPane.GetForCurrentView().OccludedRect.Height; _displayInformation = Windows.Graphics.Display.DisplayInformation.GetForCurrentView(); _displayInformation.OrientationChanged += OnOrienationChanged; }
public MainPage() { this.InitializeComponent(); this.Loaded += (s, e) => RefreshDisplayInformation(); this.SizeChanged += (s, e) => RefreshDisplayInformation(); this._displayInformation = Display.DisplayInformation.GetForCurrentView(); Display.DisplayInformation.DisplayContentsInvalidated += (s, e) => RefreshDisplayInformation(); this._displayInformation.ColorProfileChanged += (s, e) => RefreshDisplayInformation(); this._displayInformation.DpiChanged += (s, e) => RefreshDisplayInformation(); this._displayInformation.OrientationChanged += (s, e) => RefreshDisplayInformation(); this._displayInformation.StereoEnabledChanged += (s, e) => RefreshDisplayInformation(); }
public static DisplayInformation GetForCurrentView() { return(_instance ?? (_instance = new DisplayInformation())); }