Making Life Easier in Visual Studio on Silverlight Project

by Bobbi Perreault 15. April 2008 22:26
Share on Facebook

I got these tips from a document which came with the Infragistics Faceout application. http://www.infragistics.com/hot/silverlight.aspx#InfragisticsandSilverlight This information answered my prayers, I've been looking for how to do the first tip for SOME TIME now.  (I'm a little slow sometimes.....)

Disable the XAML design surface, so that when you open a XAML file in Visual Studio it opens directly in the XAML editor.  The Silverlight XAML design surface is currently read-only, can be slow to load, and sometimes throws unwarranted exceptions.  You can set the XAML editor as the default editor for .xaml files by following these steps:  

I changed my mind on the below advice, here's how I do it now because I found that when I use the option "Open With" I experienced lockups and it was a problem. (Probably just me.)

In any case, this option works much better for me: Use Visual Studio Tools menu, Select Options -- Text Editor -- XAML -- Miscellaneous. And then you will see "Always Open documents in full XAML view" That's the ticket.  Saves so much time. 


1) Right-click on a XAML file in Solution Explorer
2) In the context menu, select ‘Open With…’
3) In the Open With dialog, select ‘Source Code (Text) Editor’
4) Click the ‘Set As Default’ button


When you first open the FaceOut solution, be sure to set the Infragistics.Labs.Silverlight.FaceOut.Web project as the startup project.  You can do this by right clicking on the project node in the Solution Explorer selecting ‘Set as StartUp Project’ from the context menu.   You also must make the main ASPX page in that project the start page, by right-clicking on it and selecting ‘Set as Start Page’ from the context menu.   This is important because these settings are not stored in source control.  If you don’t do this, you will likely get exceptions when calling services on the host server (site of origin). Also, be sure to enable Silverlight debugging if you want to step through the FaceOut code in debug mode.  To enable Silverlight debugging support in Visual Studio 2008, follow these steps:
1) Open Solution Explorer and right-click on the Infragistics.Labs.Silverlight.FaceOut.Web project
2) Select ‘Property Pages’ from the context menu
3) In the Property Pages dialog, select ‘Start Options’ on the left-hand side
4) Check the ‘Silverlight’ checkbox on the right to enable Silverlight debugging
This setting is also not persisted in source control.

Tags:

StickyPad

Comments are closed

 

RSS Feed FriendFeed