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

Are Regular VACUUM ANALYZE Still Recommended Under 9.1?

Can Feynman Diagrams Be Used To Represent Any Perturbation Theory?