This project is read-only.

Transform of TextBlock and Image

Nov 12, 2009 at 1:21 PM

Hi Mikhail,

I put some TextBlock and Image in the plotter, but when I zoom the image(text block) doesnt zoom.

How is the right way to apply the transformation on the plotter in my objects?

Thanks.

Nov 13, 2009 at 4:38 PM

Hi,

This is how it is possible to put controls inside the plotter so that they zoom and pan:

 

<d3:ChartPlotter>
	<d3:ViewportHostPanel>
		<Button Content="Button" d3:ViewportPanel.ViewportBounds="0.1,0.1,0.3,0.3"/>
		<Viewbox d3:ViewportPanel.ViewportBounds="0.4,0.4,0.3,0.3">
			<Border BorderBrush="Yellow" BorderThickness="1">
				<TextBlock Text="Text in Viewbox"/>
			</Border>
		</Viewbox>
	</d3:ViewportHostPanel>
</d3:ChartPlotter>

ViewportBounds property sets the entire rectangle in the visible area, occupied by the control that sets this property on it.

I put TextBlock into Viewbox to enable TextBlock's zooming.

Best regards,

Mikhail.