Design view exceptions in Blend

Posted on

The last few days, there have been more visitors looking for answers as to how to make a design exception “go away” without having to run the project.

The solution to this is just simply to build your project (ctrl+shift+b).  If you’d prefer to do it via the menu strip, click on Project->Build Project.  You can also do a rebuild.

Now why would this occur?  You might have a custom control instantiated into another xaml file, or development which has been updated that changes the visual elements, and sometimes you’re like me, applying something, and its just not showing.  Heck, 2 days ago, I spent at least 5 hours banging my head up against a wall because I couldn’t get a custom control to actually show in the design view, there weren’t any exceptions either.  It just wasn’t there.

I got to the point where I decided that perhaps I’d forgotten a step, so I popped into MSDN and started going through “Try It” sections.

… I discovered that all I needed to do was to rebuild, everything else that I was doing was correct.  I rebuilt the project and vwalla – there it was. 

 Hopefuly I learned that lesson well enough to not encounter this particular “issue” again. 

I hope this helps others who encounter the exception issues as well!

MS Surface objects stretching

Posted on

In my hands has been this lovely package that I’ve hardly had any time to tinker with in the last month – the Microsoft Surface SDK – as in, creating something that could potentially run on the microsoft surface, seriously useful for being able to see how “Simon” looks and interacts in its MS Surface form.

Finally, this week, work has let up a bit and I’m able to spend some time playing around with the SDK and how things work in XAML and C# on a Surface app differently than with WPF and Silverlight.

Well I’m designing away on this cute little idea of an application and I decided to give it a whirl after adding a few objects and I’m discovering something that is not anticipated.  Some of my objects are stretching!  What the heck! 

Of course I was doing the usual, overthinking the issue – I start looking for some sort of “constrain proportions” or “stretch to screen” or something to that effect.

After scratching my head for at least 2 hours (and in the process, discovering a whole lot of other things I might tinker with in the future), I finally discovered the problem.

Height and width were set to something similar to the below:

 width: Auto (96.0230004)
height: Auto (96.024)

This is easy to resolve. Clicking where the dimensions are, the numbers in parenthesis display. Once the numbers are there, I scale them down to a less specific number (i.e. turning 96.0230004 to 96.023) and hitting enter.

Running the application shows my objects no longer stretching. Hurah!