Galkin
Galkin

Reputation: 843

Is it possible to zoom dynamic content with silverlight?

I am new one with Silverlight and I am interested in how to zoom dynamic content. For instance i have canvas and several listboxes and i want to zoom it.

Upvotes: 0

Views: 376

Answers (1)

markti
markti

Reputation: 4528

Yes.

Every visual element within Silverlight has a number of different ways you can transform it. Scaling can be applied by adding a ScaleTransform object othe an objects renderTransform.

<Canvas>
     <Canvas.RenderTransform>
          <ScaleTransform ScaleX="2" ScaleY="2" />
     </Canvas.RenderTransform>
     <ListBox />
</Canvas>

The above XAML will scale everything inside the Canvas (in this case just the ListBox). The ListBox will continue to behave just like a ListBox.

Upvotes: 1

Related Questions