I found many picture processing apps in windows phone store. And most of them were able to add a frame to the picture and dynamically changed it. I'd like to implement a similarly feature in my app. After checking files in Google, I typed the following code:
As the coded showed. I add a background for the Grid as a picture frame. And I also could change the backgroud dynamically. Seemed like work well. But unfortuenately, I have no idea on saving the framed picture. I used the WriteableBitmap(UIElement element, Transform transform) method saved the framed picture like this:
<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
<Canvas x:Name="picCanvas" Width="456" >
<Image x:Name="picImage" Width="456" />
but the saved picture was smaller on size. e.g:The original picture was 800*600, the saved pic was 456*386.
WriteableBitmap framedPicture = new WriteableBitmap(ContentPanel,null);
What's wrong? Could any one give me a help?