Sunday, September 27, 2009

 

Making Design/Preview mode friendly in VS2008

We're all familiar with how Visual Studio doesn't make perfect use of the Design view for *.XAML pages. We also have fun getting the Design view to show itself: http://weblogs.asp.net/hpreishuber/archive/2009/07/18/silverlight-3-visual-studio-2008-designer-preview.aspx

Even after it's shown it's doesn't like to properly center the image. I found the easyiest way to make Design mode friendly is to add a TranslateTransform to the Layout root. Then manipulate the X and Y values until it shows up properly in the Design view:


   <canvas name="LayoutRoot">
     <canvas.rendertransform>
       <translatetransform x="-500" y="-500">
     </Canvas.RenderTransform>
   <!-- Control content ... -->

Comments: Post a Comment

Subscribe to Post Comments [Atom]





<< Home

This page is powered by Blogger. Isn't yours?

Subscribe to Posts [Atom]