void OnSizeChanged(object sender, WindowSizeChangedEventArgs e) { base.SetActive( ((this.AspectRatio == AspectRatio.Landscape) && (e.Size.Width > e.Size.Height)) || ((this.AspectRatio == AspectRatio.Portrait) && (e.Size.Width <= e.Size.Height))); }
private void Window_SizeChanged(object sender, Windows.UI.Core.WindowSizeChangedEventArgs e) { if (e.Size.Width > 920 && Frame.BackStackDepth > 0) { Frame.GoBack(); } }
private void OnWindowSizeChanged(object sender, WindowSizeChangedEventArgs e) { var size = e.Size; var stateName = size.Width <= 500 ? "NarrowState" : "WideState"; VisualStateManager.GoToState(this, stateName, true); }
void ExtendedSplash_OnResize(Object sender, WindowSizeChangedEventArgs e) { if (splash != null) { splashImageRect = splash.ImageLocation; PositionImage(); //PositionRing(); PositionLoginButton(); } }
void ExtendedSplash_OnResize(Object sender, WindowSizeChangedEventArgs e) { // Safely update the extended splash screen image coordinates. This function will be fired in response to snapping, unsnapping, rotation, etc... if (this.SP != null) { // Update the coordinates of the splash screen image. this.splashImageRect = this.SP.ImageLocation; this.PositionImage(); } }
private void Window_SizeChanged(object sender, Windows.UI.Core.WindowSizeChangedEventArgs e) { if (ShouldGoToWideState()) { Window.Current.SizeChanged -= Window_SizeChanged; NavigateBackForWideState(useTransition: false); } }
void Current_SizeChanged(object sender, Windows.UI.Core.WindowSizeChangedEventArgs e) { // Get the new view state // Add: using Windows.UI.ViewManagement; string CurrentViewState = ApplicationView.GetForCurrentView().Orientation.ToString(); // Trigger the Visual State Manager VisualStateManager.GoToState(this, CurrentViewState, true); }
private void RaiseSizeChanged(Windows.UI.Core.WindowSizeChangedEventArgs windowSizeChangedEventArgs) { SizeChanged?.Invoke(this, windowSizeChangedEventArgs); CoreWindow.GetForCurrentThread()?.OnSizeChanged(windowSizeChangedEventArgs); foreach (var action in _sizeChangedHandlers) { action(this, windowSizeChangedEventArgs); } }
private void ExtendedSplash_OnResize(object sender, WindowSizeChangedEventArgs e) { // Safely update the extended _splash screen image coordinates. This function will be fired in response to snapping, unsnapping, rotation, etc... if (_splash == null) return; // Update the coordinates of the _splash screen image. SplashImageRect = _splash.ImageLocation; PositionImage(); PositionRing(); }
// Safely update the extended splash screen image coordinates. This function will be executed when a user resizes the window. private void ExtendedSplash_OnResize(Object sender, WindowSizeChangedEventArgs e) { if (splash != null) { // Update the coordinates of the splash screen image. splashImageRect = splash.ImageLocation; PositionImage(); PositionRing(); } }
private void CurrentWindowOnSizeChanged(object sender, WindowSizeChangedEventArgs windowSizeChangedEventArgs) { if (windowSizeChangedEventArgs.Size.Width <= 992) { isOpened = false; } else { isOpened = true; } }
private void ExtendedSplash_OnResize(object sender, Windows.UI.Core.WindowSizeChangedEventArgs e) { // Safely update the extended splash screen image coordinates. This function will be fired in response to snapping, unsnapping, rotation, etc... if (splash != null) { // Update the coordinates of the splash screen image. splashImageRect = splash.ImageLocation; PositionImage(); PositionRing(); } }
void WindowSizeChanged(object sender, Windows.UI.Core.WindowSizeChangedEventArgs e) { if (e.Size.Width <= 750) { VisualStateManager.GoToState(this, "ColumnarLayout", false); } else { VisualStateManager.GoToState(this, "TabularLayout", false); } }
private void CurrentOnSizeChanged(object sender, WindowSizeChangedEventArgs windowSizeChangedEventArgs) { if (windowSizeChangedEventArgs.Size.Width < 1050) { VisualStateManager.GoToState(this, Loc.Main.Topics.Any() ? "SnapTopicView" : "SnapTopicList", false); } else { VisualStateManager.GoToState(this, "FullTwoColumns", false); } }
private void CoreWindow_SizeChanged(Windows.UI.Core.CoreWindow sender, Windows.UI.Core.WindowSizeChangedEventArgs args) { var appView = Windows.UI.ViewManagement.ApplicationView.GetForCurrentView(); if (!appView.IsFullScreen) { appView.TryEnterFullScreenMode(); //appView.TryEnterViewModeAsync(); } args.Handled = true; }
private void Window_SizeChanged(object sender, Windows.UI.Core.WindowSizeChangedEventArgs e) { if (ShouldGoToWideState()) { // Make sure we are no longer listening to window change events. Window.Current.SizeChanged -= Window_SizeChanged; // We shouldn't see this page since we are in "wide master-detail" mode. NavigateBackForWideState(useTransition: false); } }
private async void SizeChanged(object sender, WindowSizeChangedEventArgs e) { await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => { if (UIViewSettings.GetForCurrentView().UserInteractionMode == Windows.UI.ViewManagement.UserInteractionMode.Mouse) { SetActive(this.IsInMouseMode); } else { SetActive(!this.IsInMouseMode); } }); }
public void Current_SizeChanged(object sender, WindowSizeChangedEventArgs e) { var page = sender as Page; if (page == null) throw new Exception("sender is not a page"); var o = ApplicationView.GetForCurrentView().Orientation; var stateName = o.Equals(ApplicationViewOrientation.Landscape) ? LandscapeStateName : PortraitStateName; VisualStateManager.GoToState(page, stateName, true); }
public static void WindowSizeChanged(object sender, WindowSizeChangedEventArgs args) { ApplicationViewState viewState = ApplicationView.Value; if (viewState == ApplicationViewState.Snapped) { Window.Current.Content = App.SnappedViewFrame; } else { if (Window.Current.Content != App.MainWindowFrame) { Window.Current.Content = App.MainWindowFrame; } } Window.Current.Activate(); }
//---------------------------------------------------------------------- // PRIVATE EVENT HANDLERS //---------------------------------------------------------------------- //---------------------------------------------------------------------- private void HandleWindowResized( object sender, WindowSizeChangedEventArgs e ) { if( ApplicationView.GetForCurrentView().IsFullScreenMode && mMediaElement.IsFullScreen || !ApplicationView.GetForCurrentView().IsFullScreenMode && !mMediaElement.IsFullScreen ) { // do nothing } else if( ApplicationView.GetForCurrentView().IsFullScreenMode && !mMediaElement.IsFullScreen ) { mMediaElement.IsFullScreen = true; } else if( !ApplicationView.GetForCurrentView().IsFullScreenMode && mMediaElement.IsFullScreen ) { mMediaElement.IsFullScreen = false; } }
//Tailor the user experience of your app to be touch-first for tablet mode or mouse-first for Desktop usage. private void OnWindowSizeChanged(object sender, WindowSizeChangedEventArgs e) { switch (UIViewSettings.GetForCurrentView().UserInteractionMode) { // desktop case UserInteractionMode.Mouse: VisualStateManager.GoToState(this, "MediumState", true); break; // tablet case UserInteractionMode.Touch: default: VisualStateManager.GoToState(this, "WideState", true); break; } }
private void Current_SizeChanged(object sender, Windows.UI.Core.WindowSizeChangedEventArgs e) { object wantedItem = GridPage.FindName(ellipseName); if (wantedItem is Ellipse) { Ellipse ellipse = wantedItem as Ellipse; double newHeight = Window.Current.Bounds.Height; if (Window.Current.Bounds.Width < Window.Current.Bounds.Height) { newHeight = Window.Current.Bounds.Width; } ellipse.Height = (newHeight / 2) - 10; ellipse.Width = ellipse.Height; } }
//called when the window is resized static void _window_SizeChanged(CoreWindow sender, WindowSizeChangedEventArgs args) { if (args.Size.Width == _windowsBounds.Width) { _windowState = WindowState.Full; } else if (args.Size.Width <= 320.00) { _windowState = WindowState.Snap1Quarter; } else { _windowState = WindowState.Snap3Quarter; } _windowsBounds.Height = args.Size.Height; _windowsBounds.Width = args.Size.Width; }
private void CurrentOnSizeChanged(object sender, WindowSizeChangedEventArgs e) { var viewState = ApplicationView.Value; NormalView.Dispose(); NormalView.SetupGame(); SnappedView.Dispose(); SnappedView.SetupGame(); if (viewState == ApplicationViewState.Snapped) { NormalView.Visibility = Visibility.Collapsed; SnappedView.Visibility = Visibility.Visible; } else { NormalView.Visibility = Visibility.Visible; SnappedView.Visibility = Visibility.Collapsed; } }
private void UpdateStatusBar(object sender, Windows.UI.Core.WindowSizeChangedEventArgs e) { var color = Color.FromArgb(127, 0x65, 0x8c, 0xdd); var phone = ("Windows.Mobile" == AnalyticsInfo.VersionInfo.DeviceFamily); if (phone) { if (Window.Current.Bounds.Width > Window.Current.Bounds.Height) { SetStatusBarColor(Colors.Black); } else { SetStatusBarColor(color); } } else { SetStatusBarColor(color); } }
private void OnSizeChanged(object sender, WindowSizeChangedEventArgs e) { Element?.ForceLayout(); }
void window_SizeChanged(CoreWindow sender, WindowSizeChangedEventArgs args) { windowSize = new Size2F((float)args.Size.Width, (float)args.Size.Height); args.Handled = true; }
private static void OnWindowSizeChanged(object sender, WindowSizeChangedEventArgs windowSizeChangedEventArgs) { UpdateOrientationAwareControls(GetOrientationAwareControls(), ApplicationView.Value); }
private void WindowSizeChanged(object sender, WindowSizeChangedEventArgs e) { this.InvalidateVisualState(); }
private void WindowSizeChanged(object sender, WindowSizeChangedEventArgs e) { SetSize(); }
private void OnsizeChanged(object sender, WindowSizeChangedEventArgs e) { double AppWidth = e.Size.Width; double AppHeight = e.Size.Height; if (AppWidth <= windowsRect.Width / 2) { gView.Visibility = Visibility.Collapsed; lView.Visibility = Visibility.Visible; } else { gView.Visibility = Visibility.Visible; lView.Visibility = Visibility.Collapsed; } }
void MainPage_SizeChanged(Object sender, Windows.UI.Core.WindowSizeChangedEventArgs args) { CheckResolutionAndViewState(); }
private void CurrentWindow_SizeChanged(object sender, Windows.UI.Core.WindowSizeChangedEventArgs e) { RefreshrLayout(); }
void WindowSizeChanged(object sender, Windows.UI.Core.WindowSizeChangedEventArgs e) { // We don't use layout aware page's view states, we have our own UpdateViewState(); }
private void OnWindowSizeChanged(object sender, Windows.UI.Core.WindowSizeChangedEventArgs e) { IsDropDownOpen = false; }
/// <summary> /// Event handler for window size changes. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void OnWindowSizeChanged(object sender, Windows.UI.Core.WindowSizeChangedEventArgs e) { UpdatePositionAndVisibility(); }
private void WindowSizeChanged(object sender, Windows.UI.Core.WindowSizeChangedEventArgs e) { dimensions = e.Size; MarkedUp.AnalyticClient.SessionEvent("Window size changed"); }
private void OnWindowSizeChanged(object sender, Windows.UI.Core.WindowSizeChangedEventArgs e) { }
private void OnCurrentWindowSizeChanged(object sender, Windows.UI.Core.WindowSizeChangedEventArgs e) => UpdateState();
/// <summary> /// Respond to window resizing /// </summary> private void OnResize(WindowSizeChangedEventArgs args = null) { if (splash != null) { // extended splash is still visible, game not loaded splashImageRect = splash.ImageLocation; ExtendedSplashImage.SetValue(Canvas.LeftProperty, splashImageRect.X); ExtendedSplashImage.SetValue(Canvas.TopProperty, splashImageRect.Y); ExtendedSplashImage.Height = splashImageRect.Height; ExtendedSplashImage.Width = splashImageRect.Width; } }
void OnWindowSizeChanged(object sender, Windows.UI.Core.WindowSizeChangedEventArgs args) { UpdateMode(); }
public static void OnWindowSizeChanged(object sender, Windows.UI.Core.WindowSizeChangedEventArgs e) { _windowBounds = Window.Current.Bounds; }
private void Current_SizeChanged(object sender, Windows.UI.Core.WindowSizeChangedEventArgs e) { SetSize(e.Size.Width); }
private void CoreWindow_SizeChanged(Windows.UI.Core.CoreWindow sender, Windows.UI.Core.WindowSizeChangedEventArgs args) { //(args.Size.Width + "x" + args.Size.Height).PrintDebug(); }
private void Current_SizeChanged(object sender, Windows.UI.Core.WindowSizeChangedEventArgs e) { UpdateSize(e.Size); AnimateSections(); }
void OnWindowSizeChanged(object sender, WindowSizeChangedEventArgs e) { UpdateFullScreenModeStatus(); }
private void Current_SizeChanged(object sender, Windows.UI.Core.WindowSizeChangedEventArgs e) { UpdateSize(); }
private void ApplicationViewSizing_SizeChanged(CoreWindow sender, Windows.UI.Core.WindowSizeChangedEventArgs args) { LastSizeTime.Text = DateTime.Now.ToLongTimeString(); LastSize.Text = args.Size.Width + "x" + args.Size.Height; }
private void OnWindowSizeChanged(CoreWindow window, WindowSizeChangedEventArgs args) { //throw new NotImplementedException(); }
private void Window_SizeChanged(object sender, WindowSizeChangedEventArgs e) { // System.Diagnostics.Debug.WriteLine(string.Format("Size Changed {0}", this.GetHashCode())); CalculateState(); }
void Current_SizeChanged(object sender, Windows.UI.Core.WindowSizeChangedEventArgs e) { ChangeVisualState(e.Size.Width); }
private void Current_SizeChanged(object sender, WindowSizeChangedEventArgs e) { EvaluateLayout(); }
/// <summary> /// Invoked with the Window changes size /// </summary> /// <param name="sender">The current Window</param> /// <param name="e">Event data that describes the new size of the Window</param> private void Window_SizeChanged(object sender, Windows.UI.Core.WindowSizeChangedEventArgs e) { this.InvalidateVisualState(); }
/// <summary> /// Fired when the window size changes. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Windows_SizeChanged(object sender, WindowSizeChangedEventArgs e) { OnScreenSizeChanged((int)e.Size.Width); }
private void WindowSizeChanged(object sender, WindowSizeChangedEventArgs e) { if (ApplicationView.Value == ApplicationViewState.Snapped && !CanOpenInSnappedView) { this.IsOpen = false; } }
private void Current_SizeChanged(object sender, WindowSizeChangedEventArgs e) { Calculate(); }
private void Current_SizeChanged(object sender, Windows.UI.Core.WindowSizeChangedEventArgs e) { var visibleScreen = GetScreenBounds(); ResizeInlineFrameDialog(visibleScreen.Height, visibleScreen.Width); }
private void Current_SizeChanged(object sender, Windows.UI.Core.WindowSizeChangedEventArgs e) => InvalidateMeasure();
private void OnWindowSizeChanged(WindowSizeChangedEventArgs args) { if (_popup.IsOpen && _popup.Child != null && _settings != null) UpdatePopup(args.Size.Width, args.Size.Height); }