Luis Guerrero Hablando de .NET, Silverlight, WPF, Windows Phone 7 y depuración

29Apr/100

El player de Tele5 es ahora un Microsoft Case Study

Hola a todos!

Trabajar como desarrollador no es fácil, los cliente están siempre nerviosos y quieren tener su software a tiempo siempre. Así que cuando descubres que el software que tú has hecho se ha convertido en un caso de éxito hay que contárselo a todo el mundo!

Unos meses atrás empezamos un reproductor de video en Silverlight para Tele5. Querían más flexibilidad para publicar su contenido, así que empezamos este reproductor de video. Empezamos antes de que MEF existiera, así que tuve que implementar mi propia arquitectura de plug-ins basada en conceptos similares a los que tiene MEF.

Así que aquí os dejo toda la información del caso de estudio y por supuesto un enlace al player para que lo podáis disfrutar.

http://www.microsoft.com/casestudies/Case_Study_Detail.aspx?casestudyid=4000007022 (EN)

http://www.microsoft.com/casestudies/Case_Study_Detail.aspx?casestudyid=4000007045 (ES)

http://www.informativos.telecinco.es/

Saludos a todos!

Luis Guerrero.

Filed under: Silverlight No Comments
13Nov/090

Silverlight, un mejor manejo de los servicios

Como todos es sabido Silverlight trae soporte para invocar servicios web, tanto servicios web tradicionales de .net como servicios de WCF. En esto últimos solo con soporte para httpBasicBinding.

Cada vez que generamos un proxy en Visual Studio para un proyecto de Silverlight, el proxy generado solo soporta invocaciones asíncronas. No podemos de ninguna manera hacer una invocación síncrona a un servicio web y esperar a la respuesta. Puede haber muchas maneras por las cuales Microsoft implemento este comportamiento predeterminado, pero creo que el más importante de todos es hacer que la UI de las aplicaciones de Silverlight *nunca* dejen de responder.

Así que puestos en antecedentes, podemos ahora estudiar nuestro problema e intentar mitigarlo. Cuando generamos un proxy en Visual Studio, lo que obtenemos es una función con el mismo nombre que la operación del servicio + “Async” y un evento que es el nombre de la operación + “Completed” en la que en los argumentos de respuesta tenemos el resultado de la invocación del servicio.

Algo como esto:

public partial class TraditionalServices : UserControl
{
    private ServiceClient service;
    public TraditionalServices()
    {
        InitializeComponent();

        service = new ServiceClient();
        service.GetDateCompleted += new EventHandler<GetDateCompletedEventArgs>(OnGetDateCompleted);
        service.GetEmployeeCompleted += new EventHandler<GetEmployeeCompletedEventArgs>(OnGetEmployeeCompleted);

        Loaded += new RoutedEventHandler(OnLoaded);
    }

    void OnLoaded(object sender, RoutedEventArgs e)
    {
        service.GetDateAsync();
    }

    void OnGetEmployeeCompleted(object sender, GetEmployeeCompletedEventArgs e)
    {

    }

    void OnGetDateCompleted(object sender, GetDateCompletedEventArgs e)
    {

    }
}

Conforme uno empieza a trabajar con los servicios de Silverlight encuentra que el código se puede volver un poco complicado puesto que no podemos invocar al servicio y después trabajar directamente con el resultado sino que lo tenemos que hacer en el método que se llamará cuando se termine la invocación del servicio.

Lo que os propongo en este artículo es que construyáis una clase Helper que os ayude a lidiar con estos problemas y hacer así el código un poco más claro.

Del código anterior para realizar la invocación a un servicio pasamos a esta:

service.GetDateTime(value =>
{
    string currentDateTime = value.ToString();
});

Como se puede apreciar el resultado es mucho mejor que la manera tradicional de trabajar con los proxies además de que el código queda mucho más claro.

¿Cómo está este helper implementado?

La idea es usar expresiones Lambda para hacer el código más legible, lo único que necesitamos es un delegado de tipo Action<T> en el que T será del mismo tipo del resultado de nuestra invocación al servicio web.

public void GetDateTime(Action<DateTime> value)
{
    service.GetDateAsync(value);
}

Con este simple patrón podemos simplificar las llamadas al servicio web y esconder su complejidad.

public partial class MainPage : UserControl
{
Helpers.ServiceHelper service;
public MainPage()
{
   InitializeComponent();

   service = Helpers.ServiceHelper.Instance;

   service.GetDateTime(value =>
   {
       string currentDateTime = value.ToString();
   });

   service.GetEmployee(value =>
   {
       ListBox listbox = new ListBox();
       listbox.ItemsSource = value;
       LayoutRoot.Children.Add(listbox);
   });

   service.DoStuff(() =>
   {
       // do stuff done
   });
}
}

Lo que hace la clase Helper es, cada vez que se realiza una invocación del servicio web se pasa por parámetro una referencia del delegado de tipo Action<T> que contiene la función que se llamará cuando termine la invocación. Una vez que termina la invocación del servicio lo que hacemos es obtener ese valor de vuelta y invocar al delegado con el resultado que es del mismo tipo que la signatura del delegado Action<T>.

public class ServiceHelper
{
private static ServiceHelper instance = new ServiceHelper();
public static ServiceHelper Instance { get { return instance; } }

private ServiceClient service;

private ServiceHelper()
{
   service = new ServiceClient();
   service.GetDateCompleted += new EventHandler<GetDateCompletedEventArgs>(OnGetDateCompleted);
   service.GetEmployeeCompleted += new EventHandler<GetEmployeeCompletedEventArgs>(OnGetEmployeeCompleted);
   service.AddCompleted += new EventHandler<AddCompletedEventArgs>(OnAddCompleted);
   service.DoStuffCompleted += new EventHandler<System.ComponentModel.AsyncCompletedEventArgs>(OnDoStuffCompleted);
}

void OnDoStuffCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e)
{
   if (e.Error == null)
   {
       Action action = (Action)e.UserState;
       action();
   }
}

void OnAddCompleted(object sender, AddCompletedEventArgs e)
{
   if (e.Error == null)
   {
       Action<int> action = (Action<int>)e.UserState;
       action(e.Result);
   }
}

void OnGetEmployeeCompleted(object sender, GetEmployeeCompletedEventArgs e)
{
   if (e.Error == null)
   {
       Action<ObservableCollection<Employee>> action = (Action<ObservableCollection<Employee>>)e.UserState;
       action(e.Result);
   }
}

void OnGetDateCompleted(object sender, GetDateCompletedEventArgs e)
{
   if (e.Error == null)
   {
       Action<DateTime> action = (Action<DateTime>)e.UserState;
       action(e.Result);
   }
}

public void GetDateTime(Action<DateTime> value)
{
   service.GetDateAsync(value);
}

public void GetEmployee(Action<ObservableCollection<Employee>> value)
{
   service.GetEmployeeAsync(value);
}

public void Add(AddArguments args, Action<int> value)
{
   service.AddAsync(args.Operand1, args.Operand2, value);
}

public void DoStuff(Action value)
{
   service.DoStuffAsync(value);
}

public class AddArguments
{
   public int Operand1 { get; set; }
   public int Operand2 { get; set; }
}
}

Os podeis descargar de aquí el ejemplo completo. http://www.luisguerrero.net/downloads/servicehelper.zip

Saludos. Luis.

Filed under: .Net, Silverlight No Comments
8Oct/090

UX Showcase at PlainConcepts

Dentro de Plain Concepts tenemos un departamento de UX (Experiencia de Usuario) en la que trabajamos con prototipos de aplicaciones y diseños. Ahora hemos decidido hacer una Web para mostrarlos todos en un mismo lugar.

http://ux.plainconcepts.com/

clip_image002

clip_image004

La web está desarrollada en Silverlight 3 y utiliza todo el potencial de Silverlight para mostrar de una manera diferente el contenido.

No os digo más, disfrutarla.

Saludos. Luis.

Filed under: Silverlight No Comments
22Sep/090

CodeCamp 2009

Este año participo como ponente en la CodeCamp 2009 que se celebra en Tarragona del 17 al 18 de Octubre.

Como no podía ser de otra manera mi charla será sobre WPF + Surface + Silverlight, y hablaremos sobre lo nuevo que viene en WPF4, como hacer cosas en Surface y que hace de nuevo en Siverlight 3.

Así que os invito a que os registréis en la web

http://www.codecamp.es/

La lista de speakers que vamos a tener este año.

http://www.codecamp.es/Speakers.aspx

Yo por lo menos no me pierdo ninguna!

Nos vemos en Tarragona!!

Luis.

29Jun/090

[Curso] WPF para programadores de Windows Forms 9 : Templates

[Curso] WPF para programadores de Windows Forms 9 : Templates

En el post anterior comentábamos como en WPF existen el árbol visual y el árbol lógico que nos permite definir como un control se comporta y como se dibuja en la pantalla, pues bien lo que vamos a ver ahora es como se pueden modificar el árbol visual y cómo podemos crear un árbol visual para una clase que no tiene árbol visual.

Todas los tipos de plantillas heredan de la misma clase, FrameworkTemplate que permite definir plantillas para diferentes tipos de controles.

image

Si nos fijamos en el diagrama, tenemos tres tipos de plantillas que definir:

· DataTemplate: permite definir una plantilla de datos, es decir asociar un árbol visual a una clase o tipo. Podemos definir cómo se va a visualizar la clase Employee.

· ControlTemplate: permite cambiar la plantilla visual de un control de WPF.

· ItemsPanelTemplate: permite cambiar la platilla de un control que es una lista de elementos, como por ejemplo un ListBox.

· HierarchicalDataTemplate: permite definir una plantilla de datos para una estructura jerárquica, como por ejemplo un árbol y asociar este a un TreeView.

DataTemplate

La clase DataTemplate permite definir una plantilla visual para un tipo cualquiera. Normalmente las plantillas se definen en XAML. Si tenemos un tipo como este:

public class Employee
{
    public string Name { get; set; }
    public int Age { get; set; }
    public string Company { get; set; }
}

Si lo establecemos como contenido de algún control WPF lo que hará será llamar al ToString() de este objeto para dibujarlo, podemos sobrescribir ToString() para darle otro sentido pero no podemos personalizar como el objeto se dibuja en pantalla.

Lo que podemos hacer es definir su plantilla visual mediante la clase DataTemplate en xaml, normalmente vamos a tener que definir nuestra DataTemplate en un diccionario de recursos o podemos hacerlo directamente en la propiedad ItemTemplate de algunos controles.

<DataTemplate DataType="{x:Type local:Employee}">
   <StackPanel>
       <TextBlock Text="{Binding Path=Name}" />
   </StackPanel>
</DataTemplate>

Como se puede observar en este ejemplo hemos definido un DataTemplate dentro del diccionario de recursos de Window, pero no hemos establecido la propiedad x:Key necesaria para poder acceder a ese valor en el diccionario, sino que lo único que hemos hecho es definir la propiedad DataType de la clase DataTemplate. Al hacer esto WPF automáticamente utilizará esta plantilla para dibujar el tipo Employee cuando se lo encuentre dentro del ámbito de la ventana. Esto es extremadamente útil, porque podemos definir esta plantilla en un ResourceDiccionary a nivel de Application y hacer que esté disponible para toda la aplicación.

Para asociar propiedades de la clase para mostrarla se realiza con un binding como se puede ver en el TextBlock, no quiero centrarme en eso ahora sino simplemente mostrar cuales son las capacidades de personalización de la DataTemplate.

Si hubiéramos utilizado un ContentControl para dibujar nuestro objeto Employe podríamos haber definido la plantilla directamente en la propiedad ContentTemplate, sin necesidad de asociar el DataType o establecer el x:Key.

<ContentControl>
    <ContentControl.ContentTemplate>
        <DataTemplate>
            <StackPanel>
                <TextBlock Text="{Binding Path=Name}" />
            </StackPanel>
        </DataTemplate>
    </ContentControl.ContentTemplate>
</ContentControl>

ControlTemplate

ControlTemplate nos permite definir o redefinir la plantilla de un control, es decir de cualquier control que herede de Control, que es donde está definida la propiedad Template. La manera de proceder es igual, para un Button tenemos:

<ControlTemplate TargetType="{x:Type Button}" x:Key="ButtonControlTemplate">
    <Microsoft_Windows_Themes:ButtonChrome x:Name="Chrome" >
        <Border BorderThickness="3" BorderBrush="red">
            <ContentPresenter />
        </Border>
    </Microsoft_Windows_Themes:ButtonChrome>
</ControlTemplate>

Lo que hemos hecho en este ejemplo es redefinir la plantilla de Button para tener esto:

clip_image004

Como se puede observar lo que tenemos en pantalla no se parece a un botón, no tiene el aspecto que esperamos de un botón, pero si preguntamos su tipo es un Button, así que lo que hemos conseguido es modificar su árbol visual sin necesidad de heredad de Button y generar un tipo nuevo, simplemente cambiado su plantilla.

Este cambio de plantilla normalmente viene integrado en un estilo (Style) pero eso lo veremos en otro post.

ItemsPanelTemplate

Esta clase permite definir la plantilla para un control de tipo ItemsControl, como por ejemplo TreeView, TabControl, etc. En este ejemplo vamos a cambiar la plantilla del ListBox para hacerlo con UniformGrid.

<ItemsPanelTemplate x:Key="ItemsPanel">
    <UniformGrid IsItemsHost="True">
    </UniformGrid>
</ItemsPanelTemplate>

Aquí podemos ver el resultado:

clip_image006clip_image008

Las posibilidades son infinitas, pues podemos personalizar cualquier control como nosotros queramos sin necesidad de tener que tocar una sola línea de código simplemente con un poco de xaml.

HierarchicalDataTemplate

Esta plantilla basada en un DataTemplate permite generar plantillas jerárquicas para nuestros tipos de datos, como está pensada para usarse con un tipo de datos, primero vamos a definir un tipo de dato en árbol y generar algunos elementos.

public class Node
{
    public string Name { get; set; }
    public ObservableCollection<Node> Items { get; set; }

    public Node()
    {
        Items = new ObservableCollection<Node>();
    }
}

Esta clase Node contiene un nombre una colección de elementos y una colección de elementos del mismo tipo en Items. Podemos definir una plantilla jerárquica como esta:

<HierarchicalDataTemplate ItemsSource="{Binding Path=Items}" x:Key="NodeTemplate">
    <TextBlock Text="{Binding Path=Name}" />
</HierarchicalDataTemplate>

Tenemos que definir cuál va a ser la propiedad que se va a usar como origen de datos para los Items que se van a generar, la propiedad ItemsSource nos permite definir mediante un Binding que la propiedad Items, de nuestra clase Node, será la encargada de generar los elementos hijos. Por cada uno de las clases Node que nos encontremos vamos a generar un TextBlock en el que vamos a asociar la propiedad Text del control, con un Binding, a la propiedad Name de nuestra clase Node.

Ahora tenemos que generar algunos elementos de ejemplo:

private Node GenerateRandomNodes()
{
    Node n = new Node();
    n.Name = "Raiz";
    for (int i = 0; i < 20; i++)
    {
        Node tmp = new Node();
        tmp.Name = i.ToString();
        n.Items.Add(tmp);
        for (int x = 0; x < 10; x++)
        {
            Node tmp2 = new Node();
            tmp2.Name = string.Format("{0} - {1}", i, x);
            tmp.Items.Add(tmp2);
        }
    }
    return n;
}

Una vez ejecutado este es el resultado:

clip_image010

Resumiendo

Como se puede observar una de las cosas buenas de tener un árbol visual y un lógico es que podemos redefinir como nuestro control o clase se visualiza en pantalla simplemente generando una plantilla. Las plantillas son el mecanismo natural por el cual se pueden personalizar los controles en WPF y son la principal herramienta de los diseñadores para personalizar.

Avanzado

Para terminar el artículo me gustaría hablar sobre un tema que a todos se nos plantea en algún momento, generar plantillas de manera dinámica, por código. En WPF, se pueden generar plantillas dinámicamente, pero el tema es algo complicado y abstracto. Veamos un ejemplo.

Vamos a intentar definir una plantilla dinámica para nuestro tipo de dato Employee por código, si empezamos a generar código vemos que podemos generar una instancia de la clase DataTemplate pasando por parametro el tipo del objeto al que queremos generar la plantilla, la propiedad VisualTree de tipo FrameworkElementFactory nos permite definir como queremos que sea nuestra plantilla.

Todo el trabajo está en esta clase FrameworkElementFactory, para definir los elementos tenemos que especificar cómo se construirán, así que siguiendo nuestro ejemplo de DataTemplate, en el que tenemos un StackPanel y dentro un TextBlock así es como se definiría en código:

   1: private DataTemplate GenerateDataTemplate()
   2: {
   3:     DataTemplate dt = new DataTemplate(typeof(Employee));
   4:     FrameworkElementFactory stackPanel = new FrameworkElementFactory();
   5:     stackPanel.Type = typeof(StackPanel);
   6:     stackPanel.SetValue(StackPanel.BackgroundProperty, new SolidColorBrush(Colors.Yellow));
   7:     FrameworkElementFactory text = new FrameworkElementFactory(typeof(TextBlock));
   8:     text.SetBinding(TextBlock.TextProperty, new Binding("Name"));
   9:     stackPanel.AppendChild(text);
  10:     text = new FrameworkElementFactory(typeof(TextBlock));
  11:     text.SetBinding(TextBlock.TextProperty, new Binding("Company"));
  12:     stackPanel.AppendChild(text);
  13:     text = new FrameworkElementFactory(typeof(TextBlock));
  14:     text.SetBinding(TextBlock.TextProperty, new Binding("Age"));
  15:     stackPanel.AppendChild(text);
  16:     dt.VisualTree = stackPanel;
  17:     return dt;
  18: }

La idea es establecer en cada uno de los FrameworkElementFactory las DependencyProperties, Bindings y Childrens que definen a un control.

El código fuente lo podéis descargar de aquí http://www.luisguerrero.net/downloads/templates.zip

Saludos. Luis.

18Mar/090

Silverlight 3 Beta 1 !!

Hoy gracias al Mix09 ha salido la primera beta de Silverlight 3.0, en los proximos días escribiré algún post sobre las caracteristicas concretas, ahora os dejo enlaces y caracteristicas.

Enlaces:

  • Silverlight 3 Beta Tools for Visual Studio – this will install the developer runtime of Silverlight 3 Beta, the Visual Studio project templates and the Silverlight 3 Beta SDK
  • Silverlight 3 Beta developer runtimes: Windows or Mac.  If you installed the tools above, you will get the developer runtime and there is no need to install it again.  These downloads are being made available for test machines for the Windows and Mac platforms for your applications.
  • Microsoft Expression Blend 3 Preview – this is the preview version of Expression Blend that will enable authoring of Silverlight 3 Beta applications.
  • Silverlight Toolkit – the toolkit has been updated to provide an updated to Silverlight 2 controls, a new release for Silverlight 3 Beta controls, and a new themes gallery.  All of these can be downloaded at the Silverlight Toolkit CodePlex project site.
  • .NET RIA Services – Microsoft .NET RIA Services simplifies the traditional n-tier application pattern by bringing together the ASP.NET and Silverlight platforms. The RIA Services provides a pattern to write application logic that runs on the mid-tier and controls access to data for queries, changes and custom operations. 
  • Silverlight 3 Beta Documentation – to view the Silverlight 3 Beta documentation you can view it online or download an offline CHM help file.

What’s New in Silverlight 3 Beta?

Fully supported by Visual Studio and Expression Blend, highlights of new features and functionality of Silverlight 3 include: major media enhancements, out of browser support allowing Web applications to work on the desktop; significant graphics improvements including 3D graphics support, GPU acceleration and H.264 video support; and many features to improve RIA development productivity. Also, in order to fully integrate all the .NET developer tools, Visual Studio 2008, Visual Studio 2010 and Visual Web Developer Express will support a fully editable and interactive designer for Silverlight. New features in Silverlight 3 include:

  • Support for Higher Quality Video & Audio. With support for native H.264/Advanced Audio Coding (AAC) Audio, live and on-demand IIS7 Smooth Streaming, full HD (720p+) playback, and an extensible decoder pipeline, Silverlight 3 brings rich, full-screen, stutter-free media experiences to the desktop. New and enhanced media features in Silverlight 3 include:
    • Live and on-demand true HD (720p+) Smooth Streaming. IIS Media Services (formerly IIS Media Pack), an integrated HTTP media delivery platform, features Smooth Streaming which dynamically detects and seamlessly switches, in real time, the video quality of a media file delivered to Silverlight based on local bandwidth and CPU conditions.
    • More format choice. In addition to native support for VC-1/WMA, Silverlight 3 now offers users native support for MPEG-4-based H.264/AAC Audio, enabling content distributors to deliver high-quality content to a wide variety of computers and devices.
    • True HD playback in full-screen. Leveraging graphics processor unit (GPU) hardware acceleration, Silverlight experiences can now be delivered in true full-screen HD (720p+).
    • Extensible media format support. With the new Raw AV pipeline, Silverlight can easily support a wide variety of third-party codecs. Audio and video can be decoded outside the runtime and rendered in Silverlight, extending format support beyond the native codecs.
    • Industry leading content protection. Silverlight DRM, Powered by PlayReady Content Protection enables protected in-browser experiences using AES encryption or Windows Media DRM.
  • Empowering Richer Experiences. Silverlight 3 contains new 3D graphics, animation features, hardware accelerated effects and text improvements that enable designers and developers to create next generation Web visuals. Additional features include:
    • Perspective 3D Graphics. Silverlight 3 allows developers and designers to apply content to a 3D plane. Users can rotate or scale live content in space without writing any additional code. Other effects include creating a queue in 3D and transitions.
    • Pixel Shader effects. These software based effects include blur and drop shadow. In addition, you can also write your own effect. Effects can be applied to any graphical content. An example would be to make a button appear depressed on rollover you could use a drop shadow effect on the pressed visual state.
    • Bitmap Caching. Silverlight 3 dramatically improves the rendering performance of applications by allowing users to cache vector content, text and controls into bitmaps. This feature is useful for background content and for content which needs to scale without making changes to its internal appearance.
    • New Bitmap API. With Silverlight 3, developers can now write pixels to a bitmap. Thus, they can build a photo editor to do red eye correction, perform edits on scanned documents or create specials effects for cached bitmaps from elements on the screen.
    • Themed application support. Developers can now theme applications by applying styles to their Silverlight 3 applications and changing them at runtime. Additionally, developers can cascade styles by basing them on each other.
    • Animation Effects. Silverlight 3 provides new effects such as spring and bounce. These make animation more natural. Developers can also now develop their own mathematical functions to describe an animation.
    • Enhanced control skinning. Silverlight 3 provides easier skinning capabilities by keeping a common set of controls external from an application. This allows the sharing of styles and control skins between different applications.
    • Improved text rendering & font support. Silverlight 3 allows far more efficient rendering and rapid animation of text. Applications also load faster by enabling the use of local fonts.
  • Improving Rich Internet Application Productivity. New features include:
    • 60+ controls with source code : Silverlight 3 is packed with over 60 high-quality, fully skinnable and customizable out-of-the-box controls such as charting and media, new layout containers such as dock and viewbox, and controls such as autocomplete, treeview and datagrid. The controls come with nine professional designed themes and the source code can be modified/recompiled or utilized as-is. Other additions include multiple selection in listbox controls, file save dialog making it easier to write files, and support for multiple page applications with navigation.
    • Deep Linking. Silverlight 3 includes support for deep linking, which enables bookmarking a page within a RIA.
    • Search Engine Optimization (SEO). Silverlight 3 enables users to solve the SEO-related challenges posed by RIAs. By utilizing business objects on the server, together with ASP.NET controls and site maps, users can automatically mirror database-driven RIA content into HTML that is easily indexed by the leading search engines.
    • Enhanced Data Support Silverlight 3 delivers:
      • Element to Element binding : UI designers use binding between two UI properties to create compelling UI experiences. Silverlight now enables property binding to CLR objects and other UI components via XAML, for instance binding a slider value to the volume control of a media player.
      • Data Forms. The Data Form control provides support for layout of fields, validation, updating and paging through data.
      • New features for data validation which automatically catch incorrect input and warn the user with built-in validation controls.
      • Support for business objects on both client and server with n-Tier data support. Easily load, sort, filter and page data with added support for working with data. Includes a new built-in CollectionView to perform a set of complex operations against server side data. A new set of .NET RIA services supports these features on the server.
    • Improved performance, through:
      • Application library caching, which reduces the size of applications by caching framework on the client in order to improve rendering performance.
      • Enhanced Deep Zoom, allows users to fluidly navigate through larger image collections by zooming.
      • Binary XML allows communication with the server to be compressed, greatly increasing the speed at which data can be exchanged.
      • Local Connection This feature allows communication between two Silverlight applications on the client-side without incurring a server roundtrip: for instance a chart in one control can communicate with a datagrid in another.
  • Advanced Accessibility Features. Silverlight 3 is the first browser plug-in to provide access to all system colors, allowing partially-sighted people to make changes such as high contrast color schemes for ease of readability by using familiar operating system controls.
  • Out of Browser Capabilities. The new out of browser experience in Silverlight 3 enables users to place their favorite Silverlight applications directly onto their PC and Mac, with links on the desktop and start menu—all without the need to download an additional runtime or browser plug-in. Further, the new experience enables Silverlight applications to work whether the computer is connected to the Internet or not—a radical improvement to the traditional Web experience. Features include:
    • Life outside the browser. Silverlight applications can now be installed to and run from the desktop as lightweight web companions. Thus, users can take their favorite Web applications with them, regardless of whether they are connected to the Internet or not.
    • Desktop shortcuts and start menu support. Silverlight applications can be stored on any PC or Mac computer’s desktop with links in the start menu and applications folder, and so are available with one-click access.
    • Safe and secure. Leveraging the security features of the .NET Framework, Silverlight applications run inside a secure sandbox with persistent isolated storage. These applications have most of the same security restrictions as traditional web apps and so can be trusted without security warnings or prompts, minimizing user interruptions.
    • Smooth installation. Because Silverlight applications are stored in a local cache and do not require extra privileges to run, the installation process is quick and efficient.
    • Auto-update. Upon launch, Silverlight applications can check for new versions on the server, and automatically update if one is found.
    • Internet connectivity detection. Silverlight applications can now detect whether they have Internet connectivity and can react intelligently including caching a users’ data until their connection is restored.

New Features in Expression Blend 3 Preview: The designer-developer workflow took another major step forward today with major innovations in Expression Blend 3 including: SketchFlow, a rapid prototyping capability that makes it easy to communicate design intent to stakeholders; design time sample data that enables the design and testing of applications without access to live data; direct import of Adobe Photoshop and Illustrator files; behaviors, extensible and reusable components that add interactivity to applications without writing code; a full code editor supporting C#, VB and XAML; and many more features that support an improved design and development experience.

  • SketchFlow. SketchFlow introduces a new set of features designed to make it easier for you to experiment with dynamic user experiences and create compelling prototypes. SketchFlow also helps communicate design ideas to other stakeholders, and makes it easier to collect in-context annotated feedback. SketchFlow enables the navigation and composition of an application to be modeled in a very visual manner from a simple prototype that uses a series of sketches, to something much more evolved. A prototype can be made as real and interactive as it needs to be to communicate design intent and SketchFlow can leverage all the existing features of Expression Blend.
  • Adobe Photoshop and Illustrator import. The powerful importers for both Adobe Photoshop and Adobe Illustrator enable smooth integration with workflows the designer already has in place. The designer has freedom to view and import Photoshop files layer by layer. Layers can be easily regrouped and elements retain their original formats; layers, layer positions, editable text and vectors remain available for editing within Expression Blend.
  • Behaviors. Add interactivity to your application, without having to write code. Behaviors can encapsulate complex design interactions into reusable components which can be directly applied to a user interface element in the application. Developers have access to a rich API that they can use to write their own triggers, actions, and behaviors for use in their Silverlight and WPF projects.
  • Sample data. Design time sample data makes it easy to build data-connected applications without access to live data. You can generate sample data or import sample data from an XML file and is available to controls on the artboard at design-time. You can extensively customize your sample data details, and you can easily switch between using sample data and using live data at run-time.
  • Improved design and development experience. Expression Blend 3 includes many features that improve the overall design experience including a brand new design surface making Blend more accessible to visual designers. Team Foundation Server support allows easier integration of the Blend user into Team System. Improved animation and easing functions, 3D transforms, visual effects and an improved visual state manager enable a great tooling experience.

Espero que os guste.

 

Luis.

Filed under: .Net, Silverlight No Comments