After you installed

You got a dll in your bin folder and reference list.
You got several new config entries in your web.config file.
You got XAMLtoMVC folder beneath the Conent and the Views folders of your project. These XAMLtoMVC folders contain samples for you. You should delete these folders after you played with and got know the samples.

Try this url in your web application


Try these extension methods in a view

@Html.Tacepao("leaf", "Hello World!")
@Html.SqlImage("polaroid", "Seattle", "")
@Html.XamlToPng("sample", new {smallpicture_download = "", nickname=" Einstein "})

You got these new Html helper methods (with several overloads) and new config file entries to create your own beauties. The first parameter always a config entry key in wich you can set several display options.


Tacepao is for rendering decorative textual pictures to display them on html pages.
You can configure Tacepao styles in the Web.config <tacepao> section with <add /> elements.
Tacepao styles can contain many visual properties including for example font family, size, decoration, background color, highlight color, text orientation, icon to use with text and so on. In the parameter list of the Html.Tacepao you give the style key, the text and/or icon to render with that style.
For more information see the TaCePao Configuration and the TaCePao methods.


SqlImage is for rendering decorated images to display them on html pages.
You can decorate images from various sources (including databse blob field or web url) with frame, shadow, title and watermark.
You can configure these visual styles in the Web.config <sqlImages> section with <add /> elements.
For more information see the SqlImage Configuration and the SqlImage methods.


XamlToPng is for rendering a XAML template with a data dictionary as it's DataContext to an image.
XamlToPng can do everything that the other two and more. But it requires you to know and be able to create your own XAML.
It collects data from three different sources to a dictionary. Calls WPF with a XAML file giving it the dictionary as a DataContext. WPF Renders the XAML onto a png and gives it back to you.
If you know XAML you can databind from the collected dictionary in a very convenient way.
For more information see the XamlToPng Configuration and the XamlToPng methods.

Output cache

As you can imagine these tasks can use a lot of resources. It is worth to save the generated pictures to cache. Your config file must contain OutputCacheProfiles for each of these utils. You should not remove but modify it for your own needs.
For more informatin see the Output Cache

Last edited Feb 27, 2011 at 11:49 PM by Tocsi, version 14


No comments yet.