locked
FullScreen Mode? RRS feed

  • Question

  • At this point, I'm not really new to Expression Blend 4, but it has been a learning experience. What I am trying to figure out is the Full Screen function. I have made a toggle button that is used for checked and unchecked in the Events. The code I use is:(Application.Current.Host.Content.IsFullScreen = true) for ckecked, and (Application.Current.Host.Content.IsFullScreen = false)for unchecked. Anyway, when I run the build, and the Firefox Browser fires up, I click onto the button, which enables full screen. What I see is that the button function works, but the Application remains the same size without going into a full screen mode. Is there a way to keep what I have done, and maybe there is something missing to make the full screen function work?
    Monday, May 9, 2011 8:42 PM

All replies

  • I am assuming you're using Silverlight to create an Out-of-browser (OOB) application?

    Make sure that you check the Require elevated trust when running outside the browser.

    Then, you can set Application.Current.Host.Content.IsFullScreen = true; to the button you're using.

    Wednesday, May 11, 2011 8:19 AM
  • I am not quite sure what you mean about (oob) application, and the elevated trust is something new to me too. I was wondering if you could give me some insight upon this?
    Wednesday, May 11, 2011 9:57 AM
  • At this point, I'm not really new to Expression Blend 4, but it has been a learning experience. What I am trying to figure out is the Full Screen function. I have made a toggle button that is used for checked and unchecked in the Events. The code I use is:(Application.Current.Host.Content.IsFullScreen = true) for ckecked, and (Application.Current.Host.Content.IsFullScreen = false)for unchecked. Anyway, when I run the build, and the Firefox Browser fires up, I click onto the button, which enables full screen. What I see is that the button function works, but the Application remains the same size without going into a full screen mode. Is there a way to keep what I have done, and maybe there is something missing to make the full screen function work?

    Hi

    I didn't understand exactly what you mean but if you want to fit your screen to the browsers edge use the following XML code fir you Silverlight Application. sorry if i didn't post you what you mean. (my skills in English writing is weak)

    <UserControl
    	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    	xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d"
    	x:Class="SilverlightApplication1.MainPage" d:DesignWidth="624" d:DesignHeight="376" Background="Black" Width="Auto" Height="Auto">
    
    	<Grid x:Name="LayoutRoot" Background="#FF686868">
    		<Rectangle Fill="#FFF4F4F5" HorizontalAlignment="Left" Margin="8,8,0,8" Stroke="Black" Width="168"/>
    		<Rectangle Fill="#FFF4F4F5" HorizontalAlignment="Right" Margin="0,8,8,8" Stroke="Black" Width="168"/>
    		<TextBlock HorizontalAlignment="Left" Height="24" Margin="24,32,0,0" TextWrapping="Wrap" Text="Left Corner" VerticalAlignment="Top" Width="80"/>
    		<TextBlock HorizontalAlignment="Right" Height="24" Margin="0,32,64,0" TextWrapping="Wrap" Text="Right Corner" VerticalAlignment="Top" Width="80"/>
    	</Grid>
    </UserControl>


    PK DEVELOPER
    Wednesday, May 11, 2011 4:19 PM
  • ...but the Application remains the same size without going into a full screen mode.
    Do you mean that it's going into Full Screen mode, but it's not taking up the entire screen?  If so, then check the Height and Width of your parent control, probably the parent Grid on the page.  Is it something like this, for example?:
    <UserControl...>
     <Grid Width="640" Height="480">
      [Your child elements here]
     </grid>
    </UserControl>
    
    If you have a specific Width and Height set, then it will only be that size and not expand to fill the screen.

    Wednesday, May 11, 2011 7:16 PM
  • Don't forget to check the Height und Width in the page which is hosting the SL-Application.
    Friday, May 13, 2011 6:25 AM