Saturday, July 18, 2009

New features in Silverlight 3: DataGrid control & 3D Effects

What do you think about DataGrid with perspective view? It’s interesting, isn’t it?  Today I’ll give some information about new features of DataGrid control and 3D effects.

3D Effects

You can apply 3-D effects to any Silverlight UIElement using what are called "perspective transforms." Perspective transforms are not equivalent to a 3-D engine; however, they can be used to make 2-D Silverlight content appear as if it is drawn on a 3-D plane. To apply a perspective transform to a UIElement, set the UIElement object's Projection property to a PlaneProjection. The PlaneProjection defines how the transform is rendered in space. You can use the Matrix3DProjection and Matrix3D types for more complex semi-3D scenarios.

DataGrid

In Silverlight 3 you can group, sort, and filter data in a DataGrid. You should bind it to a collection view that supports these functions (PagedCollectionView class which also provides paging functionality).

I have made my sample with DataGrid control to demonstrate its new features. I have added an animation of Matrix3DProjection object, too. The zip file also contains some good samples with PlaneProjection  I have found.

datagrid3d-sh

Friday, July 17, 2009

New features in Silverlight 3: Mouse Wheel & Multitouch

Silverlight 3 introduces support for mouse wheel input and multitouch input. Today I’ll write about this features.

Mouse Wheel

MouseWheel event is only raised and able to be handled for clients running Internet Explorer and the Microsoft Windows operating system, or that are running out-of-browser. To process mouse wheel information for other clients, you must use the HTML document object model event handling for OnMouseWheel that are available to client scripting and the HTML bridge. I also have noticed that the managed event doesn’t work well with transparent visual root.

scroll

Multitouch

Multitouch requires hardware that is capable of recording touch pressure that occurs on a surface (a tablet PC device or a graphics tablet). It also requires an environment (platform and operating system, hosting application such as a browser) that can propagate the touch input to an application. You can test new Silverlight feature with Windows 7 and Internet Explorer 8. Silverlight is registered for raw touch input, not gestures. In general, it promotes raw touch input to mouse events (however, you can disable promotion).

multi-touch-SL

Thursday, July 16, 2009

New features in Silverlight 3: Out-of-Browser support

In this post I want to show out-of-browser application in the newest Silverlight.

You can configure Silverlight applications so that users can install them from their host Web pages and run them outside the browser. An out-of-browser application can run without a network connection.

out-of-browser-settings-sh

in-browser-sh

out-of-browser-on-line-sh

out-of-browser-off-line-sh

There are other several alternative hosting options for Silverlight applications, for example in a Browser Control or  as an ActiveX control in Windows-Based application. Look for more information and samples:

New features in Silverlight 3: Merged Resource Dictionaries, Navigation & Local Messaging

Today I want to write about merged dictionaries, navigation and local messaging in Silverlight 3 RTM.

Merged Resource Dictionaries

A merged resource dictionary enables you to declare the contents of a resource dictionary by referencing an external file.

Navigation

You can make cool navigation with integration with browser, URI mapping and deep linking  in a few minutes! Default XAML  in Silverlight Navigation Application and usage of UriSourceMapper have been changed since beta.

nav1-sh

mav2-sh

Local Messaging

Local messaging enables you to create communication channels between multiple Silverlight plug-ins running on a single machine. This enables you to create complex layouts that combine multiple Silverlight-based applications with content based on other technologies. The zip file contains my sample and some cool samples  I have found.

local_msg_sh

Tuesday, July 14, 2009

New features in Silverlight 3: Application Library Caching & Application Extension Services

Silverlight 3 RTM and new versions of tools has officially released last Friday. So I have started testing new features by building my own practical examples. I want to publish them regularly. I had written many practical samples and cool application for Silverlight 3 Beta, but I hadn’t published them yet. I’ll try update them to RTW and also publish in the future.

Today I’ll write about two new  features of new Silverlight: Application Library Caching and Application Extension Services.

Application Library Caching

Application library caching can help improve startup performance when users revisit your Web site. When you use application library caching, Silverlight packages some assemblies as external parts outside the .xap file. When a user first visits your Web page, the Silverlight plug-in downloads the application package and all required external parts. These files are added to the browser cache so that they can be reused on subsequent visits.

Application Extension Services

Application extension services enable you to extend the Silverlight application model. Instead of creating a custom Application subclass, you can add application extension services through the Application.ApplicationLifetimeObjects property.

Thursday, July 2, 2009

MService

Microsoft is developing DSLs for three .NET runtimes: MWeb (ASP.NET), MService (WCF) and MEntity (EF). Early MService build was presented at MIX conference on March.  The demo was very interesting, so I’ll write some details about it.

Building and testing MService at MIX was very easy:

“M” language (in one file): type, extent and service operations (Get, Post, Put, Delete, Options)

image

Deploying the file to inetpub/wwwroot catalog (IIS with MHttpHandler).

image

Testing: generated form on the service web page or client with MUrl (f.e Intellipad)

image

With the MService version we can easily build simple services. What about services with custom operations and logic?  I’m waiting for public CTP.

Wednesday, July 1, 2009

MUrl

The MUrl is a simple DSL to communicate with RESTful services. It was presented at MIX conference on March. Last time I have tested Microsoft sample with this language updated to May CTP. I’ll write some about it.

MUrl is very easy. Document included in the sample describes it well. If you want to know how to implement custom mode in Intellipad, look into the sources.

In order to execute MUrl statement, you should select it and press Ctrl+Enter.

MUrl1

Authentication is available optionally. You can define your credentials in Windows Credential Manager.

MUrl2

Now you can manage website content, for example your posts on twitter. I added and deleted some posts using Intellipad. When I tried posting I got an “Expectation Failed” error message. Solution of the problem you can find here.

MUrl3  

Download Oslo May CTP and MUrl example and have fun!