Showing posts with label Silverlight Toolkit. Show all posts
Showing posts with label Silverlight Toolkit. Show all posts

Tuesday, June 8, 2010

Silverlight 4 RTW Samples - part II

I wrote a post with part I of my Silverlight 4 RTW practical summary a  few days ago. Today I’ll continue this topic.

I sign changes in my samples:  

  • API changes or/and new features
  • new sample showing new features

Let’s continue …

9. Out of browser applications - sandboxed (SandboxedOutOfBrowser, MultiTouchPuzzle)

Now you can silent install out of browser application without … browser. You can also launch application without installing.

10. Out of browser applications - trusted (TrustedOutBrowser)

Upon installation of an elevated trust application end user’s will be presented with dialogs shown below.  XAP signing reassures end users of the authenticity of an application’s publisher and that the code has not been tampered with.

Trusted_OOB_WithoutSigningTrusted_OOB_WithSigning

You should experiment with custom window chrome! Your application may look more distinctive!

Silverlight 4 adds the ability to discover when an OOB application’s window is being closed. The Closing event offers the opportunity to cancel this operation in trusted applications.

Trusted_OOB_CustomChrome

11. Implicit styles (ImplicitStylesDemo)

12. CompositeTransform (TransformDemo)

13. MEF (MEF, MEF2, HousePlanner, ExtensibleGrid, SilverlightMEFNavigation)

MEF in final Silverlight 4 has some changes from beta. For example, it contains new DeploymentCatalog.

14. Communication - multicast, authentication & WCF (MulticastChat, ClientHttpStackAuth, WcfTcpBinding, WcfDuplexTcpBinding, VideoChat)

When using a service configured with NetTcp binding, Silverlight does not honor TCP policy served by the server at port 943. This is one of some known WCF issues in Silverlight 4.

WCF_Video_Chat

15. Communication - WCF Data Services (WcfDataServicesDemo, BinaryDataStreamingDemo)

I have added demonstration of server-driven paging and partial entity sets to WcfDataServicesDemo example.

You can work more efficiently by using Visual Studio 2010 Data Sources window !

WCFDataServices_DataSourcesWindow

OData protocol defines a mechanism for accessing binary data separate from an entity to which it belongs. OData service can expose large binary data as a media resource that belongs to a media link entry. The WCF Data Services client for Silverlight can consume a media resource from an OData service as a binary stream.

WCFDataServices_BinaryStream1WCFDataServices_BinaryStream2

16. XML - XPath (XmlDemo)

Silverlight 4 RC/RTW introduces XPath support including XPathNavigator and LINQ to XML extension methods for evaluating XPath expressions on your XElement objects!

XmlXPath

17. New C#4 & platform features (CSharp4, ModifyHTMLbyNET)

18. ViewBox (ViewBoxDemo)

19. Toolkit - ContextMenu & Theming (ThemesDemo)

Silverlight 4 Toolkit April '10 introduces some new features and changes

ThemesDemo example shows new SystemColors theme, using themes at application and page level, custom theme, changing themes at run-time with ContextMenu control.

Toolkit_Themes_App Toolkit_Themes_Menu_Changing Toolkit_Themes_Menu_Xaml Toolkit_Themes_Menu_Code

All samples from part two you can download here

 

Silverlight 4 Tools for Visual Studio 2010 also contains some interesting features. See great video on Silverlight TV! 

Saturday, August 8, 2009

Silverlight Toolkit July 2009: Rx Framework !

The .NET Reactive Framework (Rx) uses Linq to build asynchronous code declaratively. It will be part of .NET 4.0. As of today the only place you can get it is in the Silverlight Toolkit sources (System.Reactive.dll  in the bin folder of the Silverlight Toolkit Unit Tests). The Silverlight Toolkit team is using Rx to write reliable, event-based asynchronous tests.

Jafar Husain, a developer on the Presentation Platform Controls team at Microsoft, has written very interesting posts about Rx Framework with many practical examples:

Erik Meijer has discovered that IEnumerable has a dual characteristic: as one can pull a piece of data from a collection, he can also push one into the same collection. So the Observable pattern and the Iterator pattern are the same pattern !!!  But IEnumerable can’t be used in asynchronous operations because it blocks and the team has introduced a new pair of interfaces: IObservable and IObserver.

Rx allows you to write complex, asynchronous code declaratively. With  Linq to IObservable you can transform and combine events and async callbacks to create the precise event you’re interested in. Then you register a handler and do something with the data. Rx enables you build complex events from a sequence of primitive events (f.e click, drag & drop) !

The framework includes lots of methods for constructing observables and observers. Converting events to IObservables is very easy. Rx provides a static Observable.FromEvent method. It's good practice to create extension methods for each event you would like to query (extension events).

Friday, August 7, 2009

Silverlight Toolkit July 2009: New controls

The newest Silverlight Toolkit includes some new controls and extensions. Please read this post for more information.

There are three new controls: GlobalCalendar, Rating and TreeMap.

GlobalCalendar

A GlobalCalendar control provides an easy way to style individual days and define custom Gregorian calendars. It can be used on its own, or as a drop-down part of a DatePicker control.

GlobalCalendar-sh Rating

It can be used to display or allow users to interactively select a rating value. Ratings can be whole or partial stars. By default the control displays stars but can be easily styled.

rating-sh TreeMap

It can display hierarchical data as a set of nested rectangles. Each item in the hierarchy is laid out in a rectangular area of a size proportional to the value associated with the item.

The data for my samples is Silverlight course topic list. The metrics are quantity and importance.

ItemDefinition (topics by quantity)treemap1

ItemDefinitionSelector [levels] (topics by quantity)treemap2

ItemDefinition & Interpolators (topics by quantity and importance)treemap3

ItemDefinitionSelector [regions] & Interpolators (topics by quantity and importance)treemap4

July release provides useful extensions: ItemsControlExtensions, ScrollViewerExtensions and TreeViewExtensions. For more information look here.

Tuesday, August 4, 2009

Silverlight Toolkit July 2009: DataForm & controls introduced in previous release

There are many changes in Silverlight Toolkit July 2009 release. Some controls and types have been removed from the Silverlight SDK and  they are now in the toolkit (f.e DataForm). Controls introduced in March release have been refreshed. There are also new controls and extensions. Today I’ll write about new DataForm and some refreshed controls.

DataForm

DataForm provides a flexible way to display a single object of or collection of data in a form and to interact with the object(s).  It allows IEditableObject support, for the committing or cancelling of changes; it allows field- and entity-level validation through the consumption of attributes. For more information see the links below.

I’ve build four simple examples (screenshots below) to test some features: single object and collection displaying, validation, autogenerated UI, EditTemplate with grouped DataFields, EditTemplate without DataFields, ReadOnlyTemplate. Grouping fields with standard containers is cool!

dataform1-sh2

dataform2-sh2

dataform3-sh2

dataform4-sh2

dataform5-sh2

Accordion, DomainUpDown, TimePicker, LayoutTransform, TransitioningContentControl

There are not big changes in these controls. However, I have noticed some differences when I updated samples with Accordion, DomainUpDown and TimePicker. For example Accordion bug with HeaderTemplate binding has been fixed.

Thursday, December 11, 2008

Silverlight Toolkit December 2008

This post will be about new version of Silverlight Toolkit.

In the December 2008 release Silverlight team has included: 100 new features and bug fixes, 3 new themes (Whistler BlueBureau Black, Bureau Blue), better design-time support, charting improvements, and enhanced UI Accessibility features.

WhistlerBlue   BureauBlack   BureauBlue

For more information about changes  you see:

Friday, November 14, 2008

Future of Silverlight

Last week I saw three interesting PDC presentations about Silverlight. So in this post I write about Silverlight future components and mobile edition of the technology.

PDC Silverlight sessions I've seen:

Microsoft Silverlight 2 for Mobile: Developing for Mobile Devices

pdc mobile

Silverlight 2 for mobile supports .NET programming model. You don't need to change code of your Silverlight 2 application, but you can recognize displaying device (DeviceInformation class) to do some actions (for example making full-screen only for mobile devices). You can also use wrapper to recognize gestures.  Public CTP will be available  at Q1 during 2009. Excellent session with many practical demos! (at the end very interesting demo with ducks which depend on position of mobile phone).

Microsoft Silverlight Futures: Building Business Focused Applications

business framework

Second part of this session 'Futures'  is quite interesting. In the future Microsoft will add page navigation and frameworks for business applications (for example validation, authentication, business objects, data paging). Business Logic Framework will make building n-tier applications simpler. You should see practical demo with these new components. Team is also working on editable Visual Studio Silverlight designer, design time databinding support, core platform enhancements and many new controls.

Silverlight Controls Roadmap

silverlight toolkit 

This session is about Silverlight Toolkit (WPF controls: DockPanel, WrapPanel, TreeView, Expander, Label, ViewBox, HeaderedContentControl, HeaderedItemsControl + new controls:  AutoComplete, Charting, NumericUpDown + 6 themes with Implicit Style Manager). IMHO AutoComplete control is very useful and cool!  Silverlight Toolkit will be updated with new components ( Accordion, ListView) and many improvements (f.e charting, designer).  What's more - Microsoft thinks about making more new controls (MIX 2009 - MediaPlayer, TimePicker, Carousel, Rating, MaskedTextBox; in future: InPlaceEditing, AppoinmentCalendar, ImageMap, FileUpload, Menu, Slideshow).

Wednesday, November 12, 2008

Silverlight - value inheritance

This post will be about value inheritance of dependency properties in Silverlight.

You cannot write custom dependency property with inheritance. There is the fixed set of predefined properties with value inheritance, for example: FontFamily, FontSize, FontStretch, FontStyle, FontWeight, Foreground.  There was a problem with performance and Silverlight team did a number of optimizations specific to those particular properties. All properties have the same precedence order:

1.  animations -> 2. local value (and binding) -> 3. templated property -> 4. style -> 5. value inheritance -> 6. default value

BTW,  Silverlight Toolkit introduces one more way to customize controls  - themesTheme  has lower priority than style, but higher than value inheritance.

Monday, November 10, 2008

Links: Silverlight 2 RTW, Silverlight Toolkit

Here are some useful Silverlight  links which I visited last month.

Silverlight 2 Released: New controls, tools, announcements!   -  what's new in Silverlight 2 ?  Eclipse support; changes in text rendering, controls, networking, Visual Studio support of ADO.NET Data Services,  a font manager in Blend 2 SP1 and more.

Silverlight™ Dynamic Languages SDK - IronPython, IronRuby, and Managed JScript in Silverlight

Silverlight Tools RTW Released! - update for Silverlight Tools

Networking:

Unit Test Framework for Silverlight:

Tips:

Controls:

Silverlight Toolkit:  

Books:

Others: