Translation: http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/2009/03/18/ A-quick-look-at-silverlight-3-running-outside-the-browser.aspx
A notable feature of SILVERLIGHT3 is that its application can be run outside the browser. This means that an application running in a browser can be detached out and start execution with a desktop and Start menu bar icon, rather than having to have a network connection. This gives the impression that it is like an ordinary desktop application rather than a browser application.
In order to achieve independence (detached), users must have a clear choice for such applications: "The application cannot detached its own without user notification." Here's an example of "Hello World" to show:
<UserControl x:Class="SilverlightApplication1.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation%22
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml%22
Width="400" Height="300">
<StackPanel x:Name="LayoutRoot" Background="White">
<TextBlock
x:Name="txtStatus" Text="Not Set" HorizontalAlignment="Center" Margin="10" />
<Button
Content="Click Me"
Click="OnClicked"
Margin="10"/>
</StackPanel>
</UserControl>
There are also some code:
public partial class MainPage : UserControl
{
public MainPage()
{
InitializeComponent();
OnExecutionStateChanged(null, null);
App.Current.ExecutionStateChanged += OnExecutionStateChanged;
}
void OnExecutionStateChanged(object sender, EventArgs e)
{
txtStatus.Text = App.Current.ExecutionState.ToString();
}
void OnClicked(object sender, RoutedEventArgs args)
{
App.Current.Detach();
}
}