Recommended

  • Silverlight.FX
    Silverlight.FX is a light-weight application framework for building RichInternet Applications with Silverlight 2.
  • Building Modular Silverlight Applications
  • .NET RIAServices - Building Data-Driven Applications with Microsoft Silverlight andMicrosoft ASP.NET
  • Securing Silverlight Application and WCF Service using ASP.Net Authentication Techniques
  • Model– View – ViewModel in Silverlight
Skip Navigation LinksHome / News / View News

Rendering Text to a WriteableBitmap with Silverlight 3's Bitmap API

+ Add to SilverlightShow Favorites
0 comments   /   posted by Silverlight Show on Jul 17, 2009
(0 votes)
Tags: WritableBitmap , Bitmap API , UI Elements , Silverlight 3
SmartyP has been playing with one of the new features in Silverlight 3 - the Bitmap API which provides the ability to render UIElements to a bitmap and provides direct access to the pixel level information of bitmaps.

I did a few searches tonight to get started playing with the Bitmap API and found several examples, but unfortunately none of them had any source code attached, and were written against previous SL3 betas which had different method signatures relevant to the bitmap rendering, so I wanted to go ahead and post a simple example of rendering out a UIElement to a bitmap. This example shows the output of rendering a TextBlock at various font sizes and image sizes and setting the resultant bitmaps as the source for three equal sized Image UIElements.

Share


Comments

Comments RSS RSS
No comments

Add Comment

 
 

   
  
  
   
 Refresh