Creating a Silverlight project in Visual Studio vs. Blend

Posted on

You’d think that the creation of a project in either Blend or Visual Studio, that they would start the entire solution with the same files.

Unfortunately that is not the case, and this is bad, not good.

So I’m working on a project, it has a pretty reflection on it and a main background that doesn’t take away from the elements and the bad part is I started it in Blend.  So what happens when I run the silverlight application?

My SL Is in the contained box and the rest of my browser is WHITE.  I can modify this by going to the debug folder, but then I can only open build from visual studio, because blend wants to rewrite the debug html file every time it loads.

This means that when I want to center the object and make the rest of the background more cohesive… ugh!

————–

When creating a Silverlight project in Visual Studio, it not only creates the items a bit cleaner, it also creates a seperate set of folders – inside one of these folders is a beautiful basic HTML page (and an aspx page, to use HTML, you have to right-click and tell it to be the starter page) which houses the information and is editable… and the modifications stay regardless of the application that I’m using to test!

Eeeee!

I need a “tsk tsk” bird to come out of somewhere every time I forget to start a project in Visual Studio.

Cleaning up after Blend

Posted on

I’m working on a Silverlight project and I was creating a few basic states for hovering my mouse over a button, clicking, and removing my mouse from a button.


Well it wouldn’t load!

The error that I was seeing was, “Unexpected PROPERTYELEMENT in parse rule PropertyElement ::= . PROPERTYELEMENT Content? ENDTAG..”

Uhm… What?

A google search shows a few things on Unexpected Directives but nothing that was helping me.

It said it was on line 0 character 0… that makes no sense.

However, there were 2 other errors coming up regarding fill elements.  So I decided to take care of those.  For some reason, Blend 2 added several Elipse.Fill elements with no properties and child Ellipse.Fill elements which also contained no properties.  I cleared that up in Visual Studio, went back to Blend and Blend wanted to update like it should.  Cool – well I switched back to visual studio and blend put those dang things in again!  Ugh.

So I closed Blend, praying that all the work that I’d just done wasn’t going to be one of those instances where it’d take less time to recreate than to debug.  I opened the project in Blend and was relieved to see now that Blend didn’t like the XAML either.  Cleaned out the excess ellipse.fill elements, saved, came back to blend, told it to update and… yay!  There aren’t any errors.

That lack of errors includes the strange error mentioned earlier.