Aligning Content In A WPF Viewbox


Answer :

Try VerticalAlignment="Top" and HorizontalAlignment="Left" on your viewbox. It will cause it to be anchored to the top and left side.

<Grid>     <Viewbox VerticalAlignment="Top" HorizontalAlignment="Left">     ...     </Viewbox> </Grid> 

If you want it to completely fill (but keep it uniform) you can use Stretch="UniformToFill"


Comments

Popular posts from this blog

Converting A String To Int In Groovy

"Cannot Create Cache Directory /home//.composer/cache/repo/https---packagist.org/, Or Directory Is Not Writable. Proceeding Without Cache"

Android How Can I Convert A String To A Editable