jump to navigation

Surface Toolkit for Windows Touch Beta! 12/4/10

 

Hey there!

Surface Toolkit for Windows Touch Beta

Today, together with the VS2010 launch, Microsoft has finally released the Surface Toolkit for Windows Touch for download!

But what is it, you might ask? This toolkit enables WPF developers with Windows 7 touch PCs with the Surface controls (such as ScatterView and Library) and touch visualizations to create really awesome multitouch apps.

Stop reading this and go download it now:

http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=801907a7-b2dd-4e63-9ff3-8a2e63932a74

If you don’t have a touch device, you can use MultiTouchVista to simulate multiple touches using multiple mice. A step-by-step tutorial can be found in this link: http://wenjiun.blogspot.com/2009/11/testing-windows-7-multi-touch-with.html

Also take a look at this video from Channel 9 which shows the toolkit:

http://channel9.msdn.com/posts/LarryLarsen/Surface-Toolkit-for-Windows-Touch/

Happy multitouching!

Roberto

1 comment
Categories: .net, Dicas, Microsoft, Novidades, Surface, This is Cool, WPF
 

XAMLCast – 2a Temporada – Episódio 9 – Finger Style, SLARToolkit, Windows Phone 7 e pré-MIX10 10/3/10

 

Olá olá pessoal!

Este é o XAMLCast pré-MIX10.

Estamos ansiosos para a chegada deste grande evento que irá nos trazer grandes novidades e anúncios. E para nossa alegria, e como já havíamos falado antes, o XAMLCaster Kelps estará em Las Vegas cobrindo o evento e enviando tudo em primeira mão!

 
icon for podpress  XAMLCast - 2a Temporada - Episódio 9 [34:51m]: Play Now | Play in Popup | Download

Neste episódio falamos de:

Bolão do MIX10!
Envie sua previsão do que irá acontecer no MIX10. Para participar, basta referenciar a hashtag #bolaoxamlcast no seu post do twitter.

Ajudem o XAMLCast a entrevistar o ScottGu no MIX10
Envie um tweet (em inglês) para @ScottGu pedindo uma entrevista com o @XAMLCast (Brazilian Podcast) ou @kelps.

Com muitos pedindo, o acesso torna-se mais fácil.

Se quiserem, podem pedir para outras “personalidades” do .net/WPF/SL, como Scott Hanselman, Phil Haack, John Papa, S. Somasegar, Tim Heuer, Karen Corby, Glenn Block… o Kelps vai ter trabalho em Vegas!

Atenção!

O XAMLCast da semana que vem será especial sobre o MIX10! Assim, em vez de um grande episódio, soltaremos as notícias aos poucos, o mais rápido possível, conforme o Kelps for mandando. Por isso, não deixe de assinar e seguir o XAMLCast para não perder nada!

Para assinar:

O XAMLCast também está no Twitter!

- Twitter oficial: @xamlcast (e hashtag #xamlcast)

- Siga os XAMLCasters:

- Adicione o Twibbon do XAMLCast ao seu avatar!

Até o próximo!

Abraços,

Kelps, Roberto Sonnino e Rodrigo Kono

3 comments
Categories: Dicas, Microsoft, Novidades, Silverlight, WPF, XAMLCast
 

Quick tip: Convert images from any format to XAML 8/3/10

 

Hey there!

For today’s quick tip I’ll show how to convert images from any 2D vector format (and I really mean ANY) to XAML. It’s pretty simple!

Note: if your image is in a bitmap format (e.g. JPEG, PNG, GIF, PSD, etc), you should simply convert it to PNG or JPEG using any image editor and use it directly as a bitmap image in your app. This method is only necessary for vector file formats.

Note 2: There are specialized converters for many formats that might yield better results. I’d recommend searching the web to see if there isn’t a converter for your format before trying this method.

Requirements:

Steps:

  1. Open your image in your favorite image viewer. In this example, I’ll open an SVG from Wikipedia with Firefox.

    SVG image in Firefox
  2. Print the image to PDF with PDFCreator.

    Printing image with PDFCreator
  3. Rename the PDF file to AI using Windows Explorer. (e.g. “image.pdf” becomes “image.ai”)

    Image is in PDF formatRename to AI format
  4. Open the AI file with Expression Design. You might now want to delete some parts of the image that you don’t want to be exported.

    AI file open in Expression Design
  5. Save it to XAML as usual using File > Export… in Expression Design.

    Exporting to XAML with Expression Design

Yes, it’s THAT simple! Enjoy!

See you next time,
Roberto

This blog post is also available on

4 comments
Categories: Dicas, Expression, Silverlight, WPF
 

Quick WPF/Silverlight tip: Generic Converter MarkupExtension 4/3/10

 

Hey there!

It’s been quite a while since the last English post – XAMLCast has been taking much of my blogging time :-)

Today’s tip is an expansion of a method originally developed by Dr. WPF in this post: http://www.drwpf.com/blog/Home/tabid/36/EntryID/48/Default.aspx .

Usually, when working with Converters in WPF/SL, we always follow the same steps:

  1. Create a class that derives from IValueConverter:
    public MyConverter : IValueConverter {}
  2. Implement Convert (and sometimes ConvertBack)
    public object Convert(object value, Type  targetType, object parameter,  System.Globalization.CultureInfo culture)
    {
      // convert and return something
    }
  3. Instantiate the converter as a resource and use it:
    <ResourceDictionary ...>
        <local:MyConverter x:Key="TheConverter" />
    </ResourceDictionary>
    ...
    {Binding Converter={StaticResource TheConverter} ...}

Well, it works but it’s not a compact syntax. Following Dr. WPF’s idea, we can use a MarkupExtension to replace the StaticResource by a static instance of the Converter:

public class  MyConverter: MarkupExtension, IValueConverter
{
    private static MyConverter _converter;

    public object Convert(object  value, Type targetType, object  parameter, System.Globalization.CultureInfo culture)
    {
        // convert and return something
    }

    public object  ConvertBack(object value, Type  targetType, object parameter,  System.Globalization.CultureInfo culture)
    {
        // convert and return something (if needed)
    }

    public override object  ProvideValue(IServiceProvider serviceProvider)
    {
        if (_converter == null)
            _converter = new MyConverter();
        return _converter;
    }
}

Usage:

xmlns:conv="[Path to namespace that contains the converter]"
...
{Binding Converter={conv:MyConverter}}

Now that’s pretty!

The only problem is that with this method, you’d have to repeat the implementation of the ProvideValue for each converter you create, and we programmers hate repeating ourselves :-)

One solution I found is to create a generic abstract class that will contain that implementation, and derive each converter from that class. It’s cleaner and works the same:

using System;
using System.Windows.Data;
using System.Windows.Markup;

namespace VirtualDreams.Converters
{
    [MarkupExtensionReturnType(typeof(IValueConverter))]
    public abstract class ConverterMarkupExtension<T> : MarkupExtension where T : class, IValueConverter, new()
    {
        private static T _converter;

        public override object ProvideValue(IServiceProvider serviceProvider)
        {
            if (_converter == null)
            {
                _converter = new T();
            }
            return _converter;
        }
    }
}

Let’s apply it to MyConverter:

public class  MyConverter: ConverterMarkupExtension<MyConverter>, IValueConverter
{
    public object Convert(object  value, Type targetType, object  parameter, System.Globalization.CultureInfo culture)
    {
        // convert and return something
    }

    public object  ConvertBack(object value, Type  targetType, object parameter,  System.Globalization.CultureInfo culture)
    {
        // convert and return something (if needed)
    }
}

Usage:

xmlns:conv="[Path to namespace that contains the converter]"
...
{Binding Converter={conv:MyConverter}}

Simpler, less repetitive – that’s the way I like it!

Happy converting!

Roberto

This blog post is also available on

Comment this post
Categories: .net, Dicas, Silverlight, WPF
 

XAMLCast – 2a Temporada – Episódio 8 – MVPs do ano Silverlight, Windows Phone 7, MIX 10K e Silverlight 3D 24/2/10

 

Olá olá pessoal!

Já estamos na edição 8 e as novidades não param.
Já tem gente pedindo o XAMLCast duas vezes por semana (caramba).

No podcast desta semana falamos dos MVPs de Silverlight que foram destaque em 2009, falamos do Windows Phone e também discutimos um pouco sobre os projetos de 3D no Silverlight.
Ouça e mande sua opinião e comentário!

 
icon for podpress  XAMLCast - 2a Temporada - Episódio 8 [32:44m]: Play Now | Play in Popup | Download

Seguem os links relacionados ao podcast:

Para assinar:

O XAMLCast também está no Twitter!

- Twitter oficial: @xamlcast (e hashtag #xamlcast)

- Siga os XAMLCasters:

- Adicione o Twibbon do XAMLCast ao seu avatar!

Até o próximo!

Abraços,

Kelps, Roberto Sonnino e Rodrigo Kono

2 comments
Categories: Microsoft, Novidades, Silverlight, WPF, XAMLCast
 

XAMLCast – 2a Temporada – Episódio 7 – Silverlight Viewport, Visual Studio 2010 RC, MVVM 17/2/10

 

Caros ouvintes!

Continuando o papo técnico, este espisódio do XAMLCast traz o tema MVVM salpicado com novidades e boas dicas e referências para você estudar.

Ouça e tire suas conclusões:

 
icon for podpress  XAMLCast - 2a Temporada - Episódio 7 [32:08m]: Play Now | Play in Popup | Download

Seguem os links relacionados ao podcast:

Discutam, comentem e retwittem!

Para assinar:

O XAMLCast também está no Twitter!

- Twitter oficial: @xamlcast (e hashtag #xamlcast)

- Siga os XAMLCasters:

- Adicione o Twibbon do XAMLCast ao seu avatar!

Aguardamos seu feedback!

Abraços,

Kelps, Roberto Sonnino e Rodrigo Kono

5 comments
Categories: Dicas, Microsoft, Novidades, Silverlight, WPF, XAMLCast, XNA
 

XAMLCast – 2a Temporada – Episódio 6 – MEF, Seesmic Look, Moonlight 3 3/2/10

 

Saudações!

O XAMLCast dessa semana está mais técnico. Falamos de MEF (Managed Extensibility Framework) e também de algumas boas novidades.
Se você sabe, não sabe ou quer saber o que é MEF, ouça, tire suas conclusões, mande dúvidas e participe enviando suas sugestões e complementos para o @xamlcast no twitter.

Ouça:

 
icon for podpress  XAMLCast - 2a Temporada - Episódio 6 [25:36m]: Play Now | Play in Popup | Download

Como de tradição, seguem abaixo os links para completar o seu entendimento e ajudar nos seus estudos:

Para fechar, parabéns ao ganhador do Expression Studio!
O ganhador foi Marcelo Paiva (@marcelo_paiva). Ele foi o primeiro a retwittar as 3 palavras na sequência certa pedida pelo @xamlcast! (link: http://twitter.com/marcelo_paiva/status/8288165428).

Obrigado pela participação Marcelo, o Expression irá chegar em sua casa!

Boa sorte e espero que gostem do podcast da semana!

Para assinar:

O XAMLCast também está no Twitter!

- Twitter oficial: @xamlcast (e hashtag #xamlcast)

- Siga os XAMLCasters:

- Adicione o Twibbon do XAMLCast ao seu avatar!

Aguardamos seu feedback!

Abraços,

Kelps, Roberto Sonnino e Rodrigo Kono

7 comments
Categories: Dicas, Novidades, Open Source, Silverlight, WPF, XAMLCast
 

XAMLCast – 2a Temporada – Episódio 5 – Notícias, retrospectiva 2009, concursos e final da promoção 27/1/10

 

Palmas para o XAMLCast!

Após um impreviso técnico que causou um atraso de uma semana, o seu informativo semanal sobre XAML, Silverlight e WPF está no ar, com muitas notícias!
Ouça:

 
icon for podpress  XAMLCast - 2a Temporada - Episódio 5 [23:10m]: Play Now | Play in Popup | Download

Essa semana o XAMLCast traz as seguintes informações:

PROMOÇÃO!

Não esqueça que este episódio contém as palavras premiadas para você ganhar o Expression Studio novinho novinho!

Ouça, anote as palavras premiadas deste episódio e as palavras do episódio passado, siga o @xamlcast e fique atento no twitter!

Quando o @xamlcast perguntar as palavras premiadas informe todas as palavras na sequência correta!
O mais rápido irá levar!

Boa sorte e espero que gostem do podcast da semana!

Para assinar:

O XAMLCast também está no Twitter!

- Twitter oficial: @xamlcast (e hashtag #xamlcast)

- Siga os XAMLCasters:

- Adicione o Twibbon do XAMLCast ao seu avatar!

Aguardamos seu feedback!

Abraços,

Kelps, Roberto Sonnino e Rodrigo Kono

1 comment
Categories: Dicas, Microsoft, Novidades, Silverlight, WPF, XAMLCast
 

XAMLCast – 2a Temporada – Episódio 2 – Moonlight, AR com SL4, SL dentro do WPF, VS2010 RC 30/12/09

 

Fala pessoal!

XAMLCast is on fire!

Este episódio está muito bacana, falamos de Moonlight, AR com Silverlight 4, Silverlight renderizado no WPF e do VS2010 RC.

Ouça!

 
icon for podpress  XAMLCast - 2a Temporada - Episódio 2 [20:02m]: Play Now | Play in Popup | Download

Seguem abaixo as referências:

Para assinar:

O XAMLCast também está no Twitter!

- Twitter oficial: @xamlcast (e hashtag #xamlcast)

- Siga os XAMLCasters:

- Adicione o Twibbon do XAMLCast ao seu avatar!

Obrigado pelo feedback do 1o episódio! Esperamos que o XAMLCast fique cada vez mais do jeito que vocês querem. Aguardamos seus comentários!

Feliz ano novo! Esperamos você em 2010 para o próximo XAMLCast!

Abraços,

Kelps, Roberto Sonnino e Rodrigo Kono

4 comments
Categories: Novidades, Silverlight, WPF, XAMLCast
 

XAMLCast – 2a Temporada – Episódio 1 – O XAMLCast está de volta! 23/12/09

 

Fala pessoal!

Depois de um longo período em OFF com o XAMLCast estamos de volta!

Agora com um terceiro apresentador: Kelps Leite. Kelps é desenvolvedor Web ha 10 anos e desenvolve com Silverlight há mais de dois anos, sendo hoje um Blend Insider. Ele já participou com a gente de um XAMLCast quando foi entrevistado no TechEd 2007. Bem vindo Kelps!

No primeiro episódio dessa segunda temporada falamos das novidades do PDC 2009, Surface, Bing, SL4 e mais.

 
icon for podpress  XAMLCast - 2a Temporada - Episódio 1 [19:57m]: Play Now | Play in Popup | Download

Seguem abaixo as referências:

Para assinar:

O XAMLCast também está no Twitter!

- Twitter oficial: @xamlcast (e hashtag #xamlcast)

- Siga os XAMLCasters:

- Adicione o Twibbon do XAMLCast ao seu avatar!

O que você achou da volta do XAMLCast? Aguardamos seus comentários!

A equipe do XAMLCast te deseja um Feliz Natal e um Ótimo Ano Novo com muito XAML! E até a próxima!

Abraços,

Kelps, Roberto Sonnino e Rodrigo Kono

2 comments
Categories: Microsoft, Novidades, Silverlight, WPF, XAMLCast