Taking a picture with AR object

Jul 23, 2011 at 3:35 PM

hi,I want to take picture in slar,and I had modified BeginnersGuide sample with this website's sample.


But the result picture is no AR object.How can I take a picture that result with AR object?

and here is my test example (no ar object one)


Jul 23, 2011 at 5:31 PM

You need to render the Grid that contains the rectangle (viewport) and the AR object (TextBox).

In the XAML give the Grid a Name:

<Grid Name="VpContainer" Width="640" Height="480">
	<Rectangle Name="Viewport" Stroke="Black" StrokeThickness="2" />
		<TextBox Name="Txt" Text="Silverlight 4 rockz!" Width="300" Height="300" TextWrapping="Wrap" AcceptsReturn="True" FontSize="16" />

In C# render the Grid to a WriteableBitmap, which you can save then:

var wb = new WriteableBitmap(VpContainer, null);
// Save the wb WriteableBitmap as Jpeg or whatever to a file

Find more details in my relevant blog posts, like this one: http://kodierer.blogspot.com/2009/11/edgecam-shots-saving-silverlight-4.html


- Rene Schulte

Aug 19, 2011 at 8:23 AM

thanks you . I have solved it