July 27. 18:44 -  Enjoying dinner at SFO.

Silverlight 3 WriteableBitmap requires call to Invalidate() after Render()

September 6, 2009 18:20 by docbliny

All of the samples I cam across using WriteableBitmap seemed to be from a prerelease version. They call the constructor with an additional parameter and don't call Invalidate() which is required for the anything to actually show up in the bitmap.

private void UpdatePreview()
{
WriteableBitmap bitmap = new WriteableBitmap((int)imageSource.Width, (int)imageSource.Height);
bitmap.Render(imageSource, new TranslateTransform());
bitmap.Invalidate();
imgPreview.Source = bitmap;
}


Comments

3/10/2010 3:02:42 PM #

Software Download Music

I was looking for new directiona and came to your blog by using bing. You continue being a new source of motivation.

Software Download Music Faroe Islands