Note that there are some explanatory texts on larger screens.

plurals
  1. POCan I remove a ChildWindow from the VisualTree and put it back in to achieve FullScreen?
    text
    copied!<p>I have a popup that is a ChildWindow. Inside that popup I have a UserControl (MediaPreviewView) that has a MediaElement and some buttons to control the video. My requirements state that I need a fullscreen button and show the video fullscreen when the user clicks on the button. </p> <p>I'm using MVVM, so I decided to try this with Messaging in the MVVM Light. I'm sending a message to my base View. Inside that View's codebehind, I'm showing a Grid (hidden and at the bottom of the XAML, with a high zindex). My message contains the MediaPreviewControl and I'm setting the Grid.Children.Add( to the control. I've tried multiple things, and can get the ChildWindow to be invisible, but the buttons don't work. It seems that the ChildWindow is still on top of the buttons, even though the width and height was 0. Is there a <del>better</del> a workable approach to making my MediaPreviewView fullscreen?</p> <pre><code>public class MediaPreviewFullScreenMessage { public MediaPreviewView PreviewView { get; set; } public ChildWindow ContainerChildWindow { get; set; } public bool ChangeToFullScreen { get; set; } } // Register for FullScreen media preview Messenger.Default.Register&lt;MediaPreviewFullScreenMessage&gt;(this, (fullScreenMessage) =&gt; { this.fullScreenHolderGrid.Visibility = fullScreenMessage.ChangeToFullScreen ? Visibility.Visible : Visibility.Collapsed; this.fullScreenHolderGrid.Children.Clear(); if (fullScreenMessage.ChangeToFullScreen) { // I've tried, Visibility, width and height = 0 on the fullScreenMessage.ContainerChildWindow, even a TranslateTransform .... } }); </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload