Are you a startup?
Get BizSpark cloud access
Get up to $3,700 of cloud benefits
Don’t have MSDN?
Here’s cloud access
At the end of last week, a question came up about whether Silverlight was capable of delivering apps that go beyond the browser frame. I thought I had recalled a sample that did this up on the Silverlight gallery but couldn't locate it, so I did a little more digging. I'm pleased to inform you that if you have a requirement for this, it's pretty simple and easy to do.
The trick lies in setting the Application.Current.Host.Content object's IsFullScreen property to true - the only thing you'll need to take note of is that the transition to full screen must be done in response to user input (for security reasons.) The following XAML + code illustrate (please don't mind the color scheme of the gradient fill.)
<GradientStop Offset="0" Color="Orange"/>
<GradientStop Offset="0.5" Color="Bisque"/>
<GradientStop Offset="1" Color="LightGreen"/>
<Button x:Name="MyButton" Canvas.Left="20" Canvas.Top="20" Content="Full Screen?" Height="50" Width="100"/>
<Button x:Name="MyOtherButton" Canvas.Left="20" Canvas.Top="120" Content="Not Full Screen?" Height="50" Width="100"/>
public partial class Page : UserControl
this.MyButton.Click += new RoutedEventHandler(MyButton_Click);
this.MyOtherButton.Click += new RoutedEventHandler(MyOtherButton_Click);
void MyButton_Click(object sender, RoutedEventArgs e)
//get the plugin content object
System.Windows.Interop.Content content = Application.Current.Host.Content;
content.IsFullScreen = true;
void MyOtherButton_Click(object sender, RoutedEventArgs e)
content.IsFullScreen = false;
Have fun with this, but please don't abuse full screen apps. :)
As full screen Silverlight apps do not have keyboard support, they are just about useless. So you don't need to worry about people abusing them.
My latest in a series of the weekly, or more often, summary of interesting links I come across related to Visual Studio. Scott Guthrie announced the availability of ASP.NET MVC Preview 3 . The release was also mentioned by Phil Haack and Scott Hanselman