Silverlight scaletransform adjust scrollbars -
I have the following UI element hierarchy: UserControl> ScrollViewer> Canvas I'm portraying a lot of things on the canvas and it The user becomes larger than the control on which the scrollwizard shows the scrollbar. So far, so good. Now I apply a scale transform form to the canvas (say, 2.0, make everything bigger twice) However, to not adjust my scrollbar, so I can now just scroll halfway through my big canvas I am How do I get to adjust my ScrollViewer scrollbar when I apply a skeleton to Canvas appearing within ScrollViewer?
Your problem is that ScaleTransform
is a RenderTransform
and any LayoutTransform
is not the size of ScrollViewer's size, even if it is the scale.
I have used it in the past that there is a canvas walk in the canvas nest in another canvas. You can then display the actual dimension of the inner canvas to change the size of the outer canvas in the code. ScrollViewer
will then update to reflect the correct dimensions. You can not really change the size of the inner canvas, you just change the scale.
Comments
Post a Comment