Click here to Skip to main content
15,894,825 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: Silverlight 3 Released! Pin
Steve Maier14-Jul-09 11:35
professionalSteve Maier14-Jul-09 11:35 
GeneralRe: Silverlight 3 Released! Pin
Kevin McFarlane14-Jul-09 12:37
Kevin McFarlane14-Jul-09 12:37 
QuestionStyle with no key name [WORK-AROUND (but I'm still interested in comments)] Pin
#realJSOP10-Jul-09 8:06
mve#realJSOP10-Jul-09 8:06 
AnswerRe: Style with no key name [WORK-AROUND (but I'm still interested in comments)] Pin
Mark Salsbery10-Jul-09 13:38
Mark Salsbery10-Jul-09 13:38 
QuestionHow to convert xaml files to png and display in one page Pin
prabhkar27210-Jul-09 0:59
prabhkar27210-Jul-09 0:59 
QuestionRe: How to convert xaml files to png and display in one page Pin
Mark Salsbery10-Jul-09 6:24
Mark Salsbery10-Jul-09 6:24 
AnswerRe: How to convert xaml files to png and display in one page Pin
prabhkar27212-Jul-09 20:19
prabhkar27212-Jul-09 20:19 
GeneralRe: How to convert xaml files to png and display in one page Pin
Jeremy Likness26-Jul-09 3:22
professionalJeremy Likness26-Jul-09 3:22 
There are two steps to take any part of the page and convert to a PNG.

First, get it into a bitmap. That's simple enough. Let's say your page looks like this:


<grid x:Name="mainGrid">
 <component1/>
 <component2>
   <nestedcomponent3/>
 </component2>
</grid>


To get this to a bitmap, just do an empty transform on the grid;

WriteableBitmap bitmap = new WriteableBitmap(mainGrid, new TranslateTransform());

Now you've got your bitmap (you can do an Image.source = bitmap for example and show it)

Next, getting it to a PNG - that's a little more complicated, but also has been addressed with some libraries, like this one:

http://blogs.msdn.com/jstegman/archive/2008/04/21/dynamic-image-generation-in-silverlight.aspx[^]

Best of success!

Jeremy Likness
Latest Article: Hierarchal Data Templates in Silverlight
Blog:
http://csharperimage.jeremylikness.com/

QuestionPsd file to XAML Pin
krishnan.s9-Jul-09 23:27
krishnan.s9-Jul-09 23:27 
AnswerRe: Psd file to XAML Pin
Pete O'Hanlon9-Jul-09 23:53
mvePete O'Hanlon9-Jul-09 23:53 
GeneralRe: Psd file to XAML Pin
krishnan.s10-Jul-09 0:06
krishnan.s10-Jul-09 0:06 
GeneralRe: Psd file to XAML Pin
Pete O'Hanlon10-Jul-09 0:42
mvePete O'Hanlon10-Jul-09 0:42 
QuestionManipulating a PNG palette Pin
pnart9-Jul-09 11:50
pnart9-Jul-09 11:50 
AnswerRe: Manipulating a PNG palette Pin
Mark Salsbery10-Jul-09 6:54
Mark Salsbery10-Jul-09 6:54 
GeneralRe: Manipulating a PNG palette Pin
pnart13-Jul-09 7:05
pnart13-Jul-09 7:05 
QuestionMultiple progress bars Pin
vsaratkar9-Jul-09 4:10
vsaratkar9-Jul-09 4:10 
AnswerRe: Multiple progress bars Pin
Pete O'Hanlon9-Jul-09 4:13
mvePete O'Hanlon9-Jul-09 4:13 
AnswerRe: Multiple progress bars Pin
#realJSOP9-Jul-09 4:33
mve#realJSOP9-Jul-09 4:33 
AnswerRe: Multiple progress bars Pin
vsaratkar9-Jul-09 8:53
vsaratkar9-Jul-09 8:53 
GeneralRe: Multiple progress bars Pin
#realJSOP9-Jul-09 9:32
mve#realJSOP9-Jul-09 9:32 
GeneralRe: Multiple progress bars Pin
Mark Salsbery10-Jul-09 7:04
Mark Salsbery10-Jul-09 7:04 
QuestionCannot set a property on object 'Identity' because it is in a read-only state. [modified] Pin
ASysSolvers9-Jul-09 3:08
ASysSolvers9-Jul-09 3:08 
AnswerRe: Cannot set a property on object 'Identity' because it is in a read-only state. Pin
Pete O'Hanlon9-Jul-09 3:33
mvePete O'Hanlon9-Jul-09 3:33 
GeneralRe: Cannot set a property on object 'Identity' because it is in a read-only state. Pin
ASysSolvers9-Jul-09 3:50
ASysSolvers9-Jul-09 3:50 
AnswerRe: Cannot set a property on object 'Identity' because it is in a read-only state. Pin
Pete O'Hanlon9-Jul-09 4:13
mvePete O'Hanlon9-Jul-09 4:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.