DISQUS

Community Page on DISQUS

what is this?

Jump to original thread »
Author

Using Viewbox

Started by Fortes · 3 months ago

Nathan has called me out, so I should post some more now that I’m back from vacation. Today I’ll attempt to give a proper introduction for the simple, yet powerful Viewbox.
Images and Avalon can be scaled to fit within a layout, the most common and useful technique is a un ... Continue reading »

8 comments

  • Can you get hittesting while if you element contained within a Viewbox? Are there any limitation if compare to your element that are directly under ?
  • Can you get hittesting while if you element contained within a Viewbox? Are there any limitation if compare to your element that are directly under ?
  • Kenny: All the hittesting still works, and there are no limitations placed upon the child of a Viewbox.

    I'll be posting another example tomorrow that shows Viewbox in a (slightly) more complicated scenario.
  • Kenny: All the hittesting still works, and there are no limitations placed upon the child of a Viewbox.

    I'll be posting another example tomorrow that shows Viewbox in a (slightly) more complicated scenario.
  • I had written a couple of samples using the Nov. CTP where width and height properties on canvases / grids were set to 100%, the new March CTP does not seem to take values as %. What has changed and how do I set width, height as %.

    Thanks,
    Vaibhav
  • I had written a couple of samples using the Nov. CTP where width and height properties on canvases / grids were set to 100%, the new March CTP does not seem to take values as %. What has changed and how do I set width, height as %.

    Thanks,
    Vaibhav
  • Sorry I should have checked the following link from Nathan's web site and found the answer to my question.

    http://msdn.microsoft.com/longhorn/?pull=/libra...

    The Answer:
    Many properties (Height, Width, Top, Bottom, etc.) are now of type Double as opposed to type Length. Also, percentages cannot be used to set relative properties any longer. Instead, to achieve the effect of 100%, set the HorizontalAlignment and VerticalAlignment properties to Stretch.

    Thanks,
    Vaibhav
  • Sorry I should have checked the following link from Nathan's web site and found the answer to my question.

    http://msdn.microsoft.com/longhorn/?pull=/libra...

    The Answer:
    Many properties (Height, Width, Top, Bottom, etc.) are now of type Double as opposed to type Length. Also, percentages cannot be used to set relative properties any longer. Instead, to achieve the effect of 100%, set the HorizontalAlignment and VerticalAlignment properties to Stretch.

    Thanks,
    Vaibhav

Add New Comment

Comments are closed for this post.
Returning? Login