Conditional XAML

Posted by Nicholas on Stack Overflow See other posts from Stack Overflow or by Nicholas
Published on 2010-05-25T23:07:20Z Indexed on 2010/05/25 23:11 UTC
Read the original article Hit count: 350

Filed under:
|
|
|
|

For easy of development I'm using a ViewBox to wrap all content inside a Window. This is because my development machine has a smaller screen than the deployment machine so using a ViewBox allows for better realisation of proportion. Obviously there is no reason for it to be there on Release versions of the code. Is there an easy method to conditionally include/exclude that 'wrapping' ViewBox in XAML?

E.g.

<Window>
  <Viewbox>
    <UserControl /*Content*/>
  </Viewbox>
</Window>

© Stack Overflow or respective owner

Related posts about wpf

Related posts about xaml