Tuesday, November 27, 2007

Limitations of Silverlight fullscreen mode

We could make any Silverlight application into full screen by setting the fullScreen property of Silverlight object.

//Silverlight 1.0
plugIn.content.fullScreen =true; //Where plugIn is the Silverlight control.

//Silverlight 1.1
BrowserHost.IsFullScreen = true;

//Silverlight 2
App.Current.Host.Content.IsFullScreen =true

But when we switch into full screen we will lost some functionalities .They are

  1. Not able to capture key strokes ie no keyboard support
  2. HTML overlay elements will be hidden : This is because we are just making th Silverlight control full screen.Not the entire HTML page.

Wednesday, November 14, 2007

Some wpf and silverlight books here


Foundations of WPF: An Introduction to Windows Presentation Foundation By Laurence Moroney
Essential Windows Presentation Foundation By Chris Anderson

Friday, November 9, 2007

Silverlight tutorial links

Have some links which are related to Silverlight and enjoy.....

  1. http://www.silverlight.net/ Everything about silverlight
  2. http://www.kirupa.com/blend_silverlight/index.htm
  3. http://community.irritatedvowel.com/blogs/pete_browns_blog/default.aspx
  4. http://www.ddjsilverlight.com/tutorial/
  5. http://www.learn-silverlight-tutorial.com/
  6. http://www.silverlightfan.com/
  7. http://silverlighttutorials.blogspot.com/
  8. http://advertboy.wordpress.com/
  9. http://www.deitel.com/ResourceCenters/Programming/Silverlight/tabid/2157/Default.aspx

Silverlight in Linux / MAC

  1. http://www.mono-project.com/Moonlight

Tuesday, November 6, 2007

Zooming in Silverlight

There is no direct support to zoom a control like in WPF.But we could work around using RenderTransform.

  1. Add a ScaleTransform in the RenderTransform section
  2. Manipulate the X & Y values of ScaleTransform through code behind.ie in a Click event

Detailed steps

  1. Create a new SilverlightJavascript application ( Silverlight 1.0)
  2. Then you can see a Canvas which looks like a Button.Add 2 more canvases for ZoomIn and ZoomOut
    <Canvas Name="ZoomIn" Width="100" Height="50" Canvas.Top="370" >
    <TextBlock Text="Click me to ZoomIn"/>
    <Canvas Name="ZoomOut" Width="100" Height="50" Canvas.Top="370" Canvas.Left="150" >
    <TextBlock Text="Click me to ZoomOut"/>

  3. Add event handlers on LeftMouseDown in Scene.XAML.js file
    this.ZoomIn = rootElement.children.getItem(1);
    this.ZoomIn.addEventListener("MouseLeftButtonDown", Silverlight.createDelegate(this, this.mouseDownZoomIn));

    this.ZoomOut = rootElement.children.getItem(2);
    this.ZoomOut.addEventListener("MouseLeftButtonDown", Silverlight.createDelegate(this, this.mouseDownZoomOut));

  4. Write Handlers
    var transform=this.button.RenderTransform;
    var transform=this.button.RenderTransform;
    if(transform.ScaleX >1){

A sample is located here

Welcome to Silverlight -The new web experience

Welcome all to the new web platform Silverlight which delivers colorful,stunning & dynamic web content over alomst all the platforms.

First of all thanks to MSFT for making it compatible with MAC & Linux...

This uses the WPF technology which have XAML,Transforms etc to make the life easier...

The sad thing is that we need to have some knowledge in Javascript to write interactive code.Anyway a C# version named Silverlight Alpha 1.1 is coming...

But this have some limitations.No Controls,No Styling etc...Hope MSFT will make Silverlight stable soon... which enables developers to choose this for Production