Welcome to MSDN Blogs Sign in | Join | Help

Viewbox for Silverlight2

Viewbox is a pretty handy 'container' in WPF..   It is a decorator that scales its child content to the size available to the viewbox ( if child is smaller it scales it up >1, if child is bigger it scales it down such that it fits based on some stretch direction).

You can find source code for a sample viewbox here

If you want to see a ugly (yet still useful for those knowing viewbox) harness, there is a sample here..

Sorry for no docs; the control itself is straight forward.  Please check the docs for WPF viewbox to see how to use it; the SL2 version above mimics WPF.

Please do review the source if you are using it for a real project.

 

Cheers,

Published Tuesday, April 29, 2008 12:34 AM by jaimer
Filed under:

Comments

# Microsoft news and tips » Viewbox for Silverlight2

# re: Viewbox for Silverlight2

Jamie,

Nice, thanks for posting this.

Cheers,

Karl

Tuesday, April 29, 2008 6:53 AM by karl1406

# Silverlight 2 WrapPanel and ViewBox

These are two controls I hear people ask for that aren't currently shipping in Silverlight 2 (as of Beta

Tuesday, April 29, 2008 11:50 AM by Gold Coast

# Silverlight 2 WrapPanel and ViewBox

These are two controls I hear people ask for that aren't currently shipping in Silverlight 2 (as of Beta

Tuesday, April 29, 2008 11:50 AM by Public Sector Developer Weblog

# WPF/Silverlight/XAML Web News - 2008/04/30

WPF Frameworks Brian Noyes: Prism: Composite WPF Guidance . Great summary of "Prism" from Brian

Wednesday, April 30, 2008 7:19 AM by Rob Relyea - Xamlified
Anonymous comments are disabled
 
Page view tracker