Silverlight 3.0 Application class out-of-browser related members

Posted by on Comments (0)

In the Application class of Silverlight 3,

We may find about the out-of-browser feature :

 

  • The InstallState enumeration :

     

     

  • The InstallStateChanged event to intercept a change in the InstallState of an application :

     

     

  • The InstallState read-only property to get the current InstallState value of the application :

     

     

  • The IsRunningOutOfBrowser boolean value that indicates whether the application was launched from the out-of-browser state

     

     

  • The CheckAndDownloadUpdateAsync method is used to check for and download an updated version of the application (http://msdn.microsoft.com/en-us/library/system.windows.application.checkanddownloadupdateasync(VS.95).aspx)

     

     

  • The CheckAndDownloadUpdateCompleted event is raised when the application has finished checking for an update (cfr the CheckAndDownloadUpdateAsync method)

     

     

  • The Install method is called when you want to install the application out of the browser.

     

 

See you later!

 

Posted in: Silverlight 3.0   Tags:

Enabling offline feature of Silverlight 3 : Home Loan Application V 0.2

Posted by on Comments (1)

It's so easy to enable the offline feature of Silverlight 3 ! J

In Visual Studio, just go to your project properties. In the Silverlight tab, you'll find an "enable running application out of the browser".

If you check the checkbox, the button « Out-of-Brower Settings » will be enabled.

Clicking on this button, you'll find this dialog screen:

This is where you can customize the settings for the offline application:

  • The title, width and height of the windows.
  • The name of the shortcut.
  • A description that will become the comment property of the shortcut (on windows).
  • Different size icons. Pay attention, the icons must be in PNG format.
  • A checkbox to use or not the GPU acceleration.

Here is the resulting OutOfBrowserSettings.xml in the case of my Home Loan Application :

<OutOfBrowserSettings ShortName="Home Loan Calculator" EnableGPUAcceleration="False" ShowInstallMenuItem="True">

<OutOfBrowserSettings.Blurb>HomeLoanCalculator Application on your desktop; at home, at work or on the go.OutOfBrowserSettings.Blurb>

<OutOfBrowserSettings.WindowSettings>

<WindowSettings Title="Home Loan Calculator Application" />

OutOfBrowserSettings.WindowSettings>

<OutOfBrowserSettings.Icons>

<Icon Size="16,16">Images/Icon16.pngIcon>

<Icon Size="32,32">Images/Icon32.pngIcon>

<Icon Size="48,48">Images/Icon48.pngIcon>

<Icon Size="128,128">Images/Icon128.pngIcon>

OutOfBrowserSettings.Icons>

OutOfBrowserSettings>

This file is saved in the Properties folder of my project.

In Blend 3.0 RC, it's also possible to enable the offline feature in this menu path :

Project > Silverlight Project Options > Enable Application Outside Browser

But I don't see where the settings (icons, window title, …) are.

To test the offline feature describe in this post for my Home Loan Application, go there : http://www.renaldnollet.com/samples/HomeLoanSL3V0_2/

See you!

 

Posted in: Blend 3.0 | Silverlight 3.0   Tags:

Silverlight 3 Element Binding: Home Loan Application V 0.1

Posted by on Comments (0)

Silverlight 2 offered nice possibilities around data binding.

But one useful feature was missing: the binding of a UI element property to a property of another UI element.

Fortunately, this is now possible with Silverlight 3.

The simplest example to build is the binding of the Text property of a TextBlock to the Value of a Slider:

In this sample, the user may vary the amount he wants to loan using a Slider. This amount is displayed in the TextBlock above the slider.

Here is the corresponding XAML:

 

<TextBlock Margin="0" TextWrapping="Wrap" Text="{Binding Value, ElementName=Amount, Mode=OneWay}" Foreground="White" FontFamily="Franklin Gothic Heavy" FontSize="32" HorizontalAlignment="Center" VerticalAlignment="Center"/>

 

<Slider ValueChanged="Amount_ValueChanged" Minimum="5000" Maximum="500000" x:Name="Amount" Cursor="Hand" SmallChange="5000" LargeChange="10000" Margin="0" Value="200000"/>

 

To see this application in action: http://www.renaldnollet.com/samples/HomeLoanSL3V0_1/

See you later!

Posted in: Silverlight 3.0   Tags:

Silverlight 3 Tools for Visual Studio : where is my preview ?

Posted by on Comments (1)

If you try the new Silverlight 3 tools for Visual Studio 2008, you should be frustrated (or happy?) while not finding anymore your Silverlight preview.

This one is just… hidden! J

 

 

If you go to the bottom of the XAML page, you can drap up the XAML page and you'll discover the designer.

 

 

Accordingly to this message on the Tim Heuer's blog, it should be more than just hidden:

Where did my design view go?!  You may notice right away that the VS tools no longer have the preview mode for your XAML in Silverlight projects.  This is by design.  We heard some pretty vocal feedback that the preview was usually turned off for most development because it was not turning out to be helpful as the applications got more complex.  The team decided put the resource investment into creating a great editable design surface in VS2010 instead and not delay the release of Silverlight 3.

 

See you later!

First look at Blend 3.0 RC : a simple example of the HyperlinkAction behavior

Posted by on Comments (2)

Blend 3.0 RC is there and it's pretty exciting to play with this new tool.

Things changed between the March preview and this RC version.

Let's play with a first very simple sample of what we can now do…

Blend 3.0 has a new useful asset library: http://blogs.msdn.com/unnir/archive/2009/05/22/the-blend-3-asset-library.aspx

In my sample, I'll just deal with an image and a textbox :

If I go into my assets library, I can find a behaviors category. That's the place where we'll be able to use all the behaviors available in the assemblies referenced for a project.

If I take the HyperlinkAction behavior and drop it on my picture in the designer, I can see the properties of my behavior.

The Trigger gives information about who can fire which event. The SourceName value [Parent] means here that the event is fired by the picture.

With the piker , you can choose any other element in your artboard.

The type of event is here a MouseLeftButtonDown but many other events may be chosen from the dropdown.

The common properties indicates here where to navigate and in which target window.

Here is the resulting XAML of my picture and HyperlinkAction :

 

 

With just 0 line of code and without Visual Studio, I can create links on any Silverlight element using this HyperlinkAction!

See you later!

 

Posted in: Blend 3.0   Tags: