Silverlight/WPF cross-compile gotcha

Here’s an interesting gotcha if you are trying to cross-compile between Silverlight and WPF. The default content alignment of a ContentControl’s content in Silverlight is left/top while in WPF it’s stretch/stretch! The Silverlight ContentControl respects the VerticalContentAlignment/HorizontalContentAlignment properties (which default to left/top) while the WPF one does not. Check out the default templates of ContentControl in Silverlight and WPF for some other “cute” differences.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: