Inheritance: IWindowSizeChangedEventArgs, ICoreWindowEventArgs
コード例 #1
0
ファイル: PortraitTrigger.cs プロジェクト: xesf/UWPSpheroDemo
 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)));
 }
コード例 #2
0
 private void Window_SizeChanged(object sender, Windows.UI.Core.WindowSizeChangedEventArgs e)
 {
     if (e.Size.Width > 920 && Frame.BackStackDepth > 0)
     {
         Frame.GoBack();
     }
 }
コード例 #3
0
        private void OnWindowSizeChanged(object sender, WindowSizeChangedEventArgs e)
        {
            var size = e.Size;

            var stateName = size.Width <= 500 ? "NarrowState" : "WideState";

            VisualStateManager.GoToState(this, stateName, true);
        }
コード例 #4
0
 void ExtendedSplash_OnResize(Object sender, WindowSizeChangedEventArgs e) {
     if (splash != null) {
         splashImageRect = splash.ImageLocation;
         PositionImage();
         //PositionRing();
         PositionLoginButton();
     }
 }
コード例 #5
0
 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();
     }
 }
コード例 #6
0
        private void Window_SizeChanged(object sender, Windows.UI.Core.WindowSizeChangedEventArgs e)
        {
            if (ShouldGoToWideState())
            {
                Window.Current.SizeChanged -= Window_SizeChanged;

                NavigateBackForWideState(useTransition: false);
            }
        }
コード例 #7
0
        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);
        }
コード例 #8
0
ファイル: Window.cs プロジェクト: jokm1/uno-2
        private void RaiseSizeChanged(Windows.UI.Core.WindowSizeChangedEventArgs windowSizeChangedEventArgs)
        {
            SizeChanged?.Invoke(this, windowSizeChangedEventArgs);
            CoreWindow.GetForCurrentThread()?.OnSizeChanged(windowSizeChangedEventArgs);

            foreach (var action in _sizeChangedHandlers)
            {
                action(this, windowSizeChangedEventArgs);
            }
        }
コード例 #9
0
        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();
        }
コード例 #10
0
 // 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();
     }
 }
コード例 #11
0
 private void CurrentWindowOnSizeChanged(object sender, WindowSizeChangedEventArgs windowSizeChangedEventArgs)
 {
     if (windowSizeChangedEventArgs.Size.Width <= 992)
     {
         isOpened = false;
     }
     else
     {
         isOpened = true;
     }
 }
コード例 #12
0
 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();
     }
 }
コード例 #13
0
 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);
     }
 }
コード例 #14
0
ファイル: MainPage.xaml.cs プロジェクト: FLKone/HFR4WinRT
 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);
     }
 }
コード例 #15
0
        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;
        }
コード例 #16
0
        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);
            }
        }
コード例 #17
0
 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);
         }
     });
 }
コード例 #18
0
        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);
        }
コード例 #19
0
 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();
 }
コード例 #20
0
ファイル: PlayerPage.xaml.cs プロジェクト: alanebro82/Twitch
        //----------------------------------------------------------------------
        // 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;
            }
        }
コード例 #21
0
ファイル: MainPage.xaml.cs プロジェクト: tinwy/TinDoesWork
        //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;
            }
        }
コード例 #22
0
        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;
            }
        }
コード例 #23
0
        //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;
        }
コード例 #24
0
        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;

            }
        }
コード例 #25
0
        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);
            }
        }
コード例 #26
0
 private void OnSizeChanged(object sender, WindowSizeChangedEventArgs e)
 {
     Element?.ForceLayout();
 }
コード例 #27
0
 void window_SizeChanged(CoreWindow sender, WindowSizeChangedEventArgs args)
 {
     windowSize = new Size2F((float)args.Size.Width, (float)args.Size.Height);
     args.Handled = true;
 }
コード例 #28
0
 private static void OnWindowSizeChanged(object sender, WindowSizeChangedEventArgs windowSizeChangedEventArgs)
 {
     UpdateOrientationAwareControls(GetOrientationAwareControls(), ApplicationView.Value);
 }
コード例 #29
0
 private void WindowSizeChanged(object sender, WindowSizeChangedEventArgs e)
 {
     this.InvalidateVisualState();
 }
コード例 #30
0
 private void WindowSizeChanged(object sender, WindowSizeChangedEventArgs e)
 {
     SetSize();
 }
コード例 #31
0
ファイル: MainPage.xaml.cs プロジェクト: 1900zyh/SYSU_Win8App
 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;
     }
 }
コード例 #32
0
 void MainPage_SizeChanged(Object sender, Windows.UI.Core.WindowSizeChangedEventArgs args)
 {
     CheckResolutionAndViewState();
 }
コード例 #33
0
 private void CurrentWindow_SizeChanged(object sender, Windows.UI.Core.WindowSizeChangedEventArgs e)
 {
     RefreshrLayout();
 }
コード例 #34
0
 void WindowSizeChanged(object sender, Windows.UI.Core.WindowSizeChangedEventArgs e)
 {
     // We don't use layout aware page's view states, we have our own
     UpdateViewState();
 }
コード例 #35
0
 private void OnWindowSizeChanged(object sender, Windows.UI.Core.WindowSizeChangedEventArgs e)
 {
     IsDropDownOpen = false;
 }
コード例 #36
0
 /// <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();
 }
コード例 #37
0
 private void WindowSizeChanged(object sender, Windows.UI.Core.WindowSizeChangedEventArgs e)
 {
     dimensions = e.Size;
     MarkedUp.AnalyticClient.SessionEvent("Window size changed");
 }
コード例 #38
0
 private void OnWindowSizeChanged(object sender, Windows.UI.Core.WindowSizeChangedEventArgs e)
 {
 }
コード例 #39
0
 private void OnCurrentWindowSizeChanged(object sender, Windows.UI.Core.WindowSizeChangedEventArgs e) =>
 UpdateState();
コード例 #40
0
ファイル: MainPage.xaml.cs プロジェクト: hmcaio/UnityPorting
 /// <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;
     }
 }
コード例 #41
0
ファイル: TwoPaneView.cs プロジェクト: jokm1/uno-2
 void OnWindowSizeChanged(object sender, Windows.UI.Core.WindowSizeChangedEventArgs args)
 {
     UpdateMode();
 }
コード例 #42
0
ファイル: MainPage.xaml.cs プロジェクト: jasonsalameh/Gizmo
 public static void OnWindowSizeChanged(object sender, Windows.UI.Core.WindowSizeChangedEventArgs e)
 {
     _windowBounds = Window.Current.Bounds;
 }
コード例 #43
0
 private void Current_SizeChanged(object sender, Windows.UI.Core.WindowSizeChangedEventArgs e)
 {
     SetSize(e.Size.Width);
 }
コード例 #44
0
ファイル: MainPage.xaml.cs プロジェクト: Anushiravani/Minista
 private void CoreWindow_SizeChanged(Windows.UI.Core.CoreWindow sender, Windows.UI.Core.WindowSizeChangedEventArgs args)
 {
     //(args.Size.Width + "x" + args.Size.Height).PrintDebug();
 }
コード例 #45
0
ファイル: DetailsPage.xaml.cs プロジェクト: 27043591/GUI-
 private void Current_SizeChanged(object sender, Windows.UI.Core.WindowSizeChangedEventArgs e)
 {
     UpdateSize(e.Size);
     AnimateSections();
 }
コード例 #46
0
 void OnWindowSizeChanged(object sender, WindowSizeChangedEventArgs e)
 {
     UpdateFullScreenModeStatus();
 }
コード例 #47
0
ファイル: RootPage.xaml.cs プロジェクト: 27043591/GUI-
 private void Current_SizeChanged(object sender, Windows.UI.Core.WindowSizeChangedEventArgs e)
 {
     UpdateSize();
 }
コード例 #48
0
 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;
 }
コード例 #49
0
ファイル: Direct3DCoreWindow.cs プロジェクト: zumpiez/ankh
 private void OnWindowSizeChanged(CoreWindow window, WindowSizeChangedEventArgs args)
 {
     //throw new NotImplementedException();
 }
コード例 #50
0
 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);
 }
コード例 #52
0
 private void Current_SizeChanged(object sender, WindowSizeChangedEventArgs e)
 {
     EvaluateLayout();
 }
コード例 #53
0
ファイル: SplitPage.xaml.cs プロジェクト: githubavi/travapp
 /// <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();
 }
コード例 #54
0
 /// <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);
 }
コード例 #55
0
 private void WindowSizeChanged(object sender, WindowSizeChangedEventArgs e)
 {
     if (ApplicationView.Value == ApplicationViewState.Snapped &&
         !CanOpenInSnappedView)
     {
         this.IsOpen = false;
     }
 } 
コード例 #56
0
 private void Current_SizeChanged(object sender, WindowSizeChangedEventArgs e)
 {
     Calculate();
 }
コード例 #57
0
        private void Current_SizeChanged(object sender, Windows.UI.Core.WindowSizeChangedEventArgs e)
        {
            var visibleScreen = GetScreenBounds();

            ResizeInlineFrameDialog(visibleScreen.Height, visibleScreen.Width);
        }
コード例 #58
0
 private void Current_SizeChanged(object sender, Windows.UI.Core.WindowSizeChangedEventArgs e)
 => InvalidateMeasure();
コード例 #59
0
 private void OnWindowSizeChanged(WindowSizeChangedEventArgs args)
 {
     if (_popup.IsOpen && _popup.Child != null && _settings != null)
         UpdatePopup(args.Size.Width, args.Size.Height);
 }