Example #1
0
        public bool OnFullscreenChanged(bool goFullscreen)
        {
            // If we are disabled don't let them.
            if (!CanGoFullscreen)
            {
                return(false);
            }

            // Ignore if we are already in this state
            if (goFullscreen == IsFullscreen)
            {
                return(false);
            }
            IsFullscreen = goFullscreen;

            // Set the manipulation mode to steal all of the touch events
            ManipulationMode = goFullscreen ? ManipulationModes.All : ManipulationModes.System;

            // Fire the event
            OnToggleFullScreenEventArgs args = new OnToggleFullScreenEventArgs()
            {
                GoFullScreen = goFullscreen
            };

            m_onToggleFullscreen.Raise(this, args);
            return(true);
        }
Example #2
0
        /// <summary>
        /// Fired when the control wants to go full screen.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void FlipViewContentControl_OnToggleFullscreen(object sender, OnToggleFullScreenEventArgs e)
        {
            // Get the post
            Post post = ((Post)((FrameworkElement)sender).DataContext);

            // Set if we are full screen or not.
            m_isFullScreen = e.GoFullScreen;

            // Hide or show the header
            if (e.GoFullScreen == (post.FlipviewHeaderVisibility == Visibility.Visible))
            {
                ToggleHeader(post);
            }

            // #todo scroll comments to the top so they aren't visible?
        }
        /// <summary>
        /// Fired when the control wants to go full screen.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ContentPanelHost_OnToggleFullscreen(object sender, OnToggleFullScreenEventArgs e)
        {
            // Set the overwrite
            if(e.GoFullScreen)
            {
                // Scroll the header into view
                ScrollCommentsToTop();

                // Set the overwrite
                m_fullScreenOverwrite = true;
                m_isfullScreenOverwriteUser = false;
            }
            else
            {
                // Disable the overwrite
                m_isfullScreenOverwriteUser = null;
                m_fullScreenOverwrite = null;
            }

            // Toggle full screen.
            ToggleFullscreen(e.GoFullScreen);
        }
        public bool OnFullscreenChanged(bool goFullscreen)
        {
            // If we are disabled don't let them.
            if (!CanGoFullscreen)
            {
                return false;
            }

            // Ignore if we are already in this state
            if (goFullscreen == IsFullscreen)
            {
                return false;
            }
            IsFullscreen = goFullscreen;

            // Set the manipulation mode to steal all of the touch events
            ManipulationMode = goFullscreen ? ManipulationModes.All : ManipulationModes.System;

            // Fire the event
            OnToggleFullScreenEventArgs args = new OnToggleFullScreenEventArgs()
            {
                GoFullScreen = goFullscreen
            };
            m_onToggleFullscreen.Raise(this, args);
            return true;
        }