Hi, all
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:Code:<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0"> <Grid.Background> <ImageBrush ImageSource="/frame.jpg"/> </Grid.Background>--> <Canvas x:Name="picCanvas" Width="456" > <Image x:Name="picImage" Width="456" /> </Canvas> </Grid>
but the saved picture was smaller on size. e.g:The original picture was 800*600, the saved pic was 456*386.Code:WriteableBitmap framedPicture = new WriteableBitmap(ContentPanel,null);
What's wrong? Could any one give me a help?
Regards!

Reply With Quote

