What Was I Thinking?

Follies & Foils of .NET Development
posts - 87 , comments - 254 , trackbacks - 0

Silverlight

How to Host Silverlight Apps under IIS6
Found this online, it proved VERY helpful and wanted to pass it along. Silverlight Error #2104 Could not download the silverlight application in IIS6 If you receive this error while trying to deploy your Silverlight application, make sure you did the following things: 1. Adjust the Content Expiration Setting You should adjust the content expiration setting to 1 minute. The following procedure outlines how to do this with IIS. Right-click your Web Site and select Properties from the context menu. ......

Posted On Saturday, January 9, 2010 12:11 PM | Comments (0) | Filed Under [ Silverlight ]

Using Resharper with RIA Services.
I’m a big fan of Resharper. Its loaded with refactoring and best practice guidance that makes me a better developer. I’ve also started working with .NET RIA services. The verdict is still out on RIA services, but I think I like them. Unfortunately RIA has an interesting approach to code sharing between the web and Silverlight project that's incompatible with Resharper. It used generated code that is technically excluded from the project. As a result, any code in my Silverlight project that references ......

Posted On Monday, October 12, 2009 8:35 AM | Comments (2) | Filed Under [ Silverlight ]

Open XAP files using Windows Explorer
Silverlight bundles its executables into a single file with a XAP extension. This is really just a zip file. You can open the XAP and modify the contents just as you would any ZIP file. By default windows explorer doesn’t know how to open XAP files. The following reg file adds the metadata to tell Explorer to treat XAP files like compressed folders. I found this file somewhere on the internet, my apologies for not being able to site the source. Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\.xap] ......

Posted On Sunday, October 11, 2009 9:25 PM | Comments (4) | Filed Under [ Silverlight ]

Using Dynamic Linq in Silverlight Projects
Recently I had the need to implement support for Dynamic Linq queries in my framework project. For the uninitiated, Dynamic Linq allows me to write statements like this: var query = db.Customers.Where("City == @0 and Orders.Count >= @1", "London", 10). OrderBy("CompanyName"). Select("New(CompanyName as Name, Phone)"); where I can specify the predicates and selectors as string values. Microsoft has published a helper class that enables DynamicLinq support here -->C# Dynamic Query Library (included ......

Posted On Saturday, October 10, 2009 11:41 AM | Comments (16) | Filed Under [ Silverlight ]

Silverlight (3) ComboBox binding made easy.
Manish Dalal wrote an excellent post on how to effectively data bind a silverlight combobox for foreign key scenarios. Using his approach, you create a ListProvider class that receives a DomainContext, internally loads the data into the context, and exposes the loaded data through an easily bound property. Having written a few of these, I’ve refactored the list provider functionality to a generic base class. The heavy lifting is done via reflection and it should be noted that my code assumes you ......

Posted On Thursday, October 1, 2009 6:52 PM | Comments (8) | Filed Under [ Silverlight ]

Restoring the Design View for XAML files in Visual Studio for Silverlight 3
It appears Microsoft has removed the designer for XAML files from the latest release of Silverlight 3 Tools. The designer isn’t really gone, its just moved to the bottom of the editor and is hidden by default. To restore the designer view: 1. Open your .xaml file in the default vs editor. 2. Move your cursor to the bottom of the edit window (right underneath the horizontal scroll) and it should change to a split-style cursor 3. Click and drag up to reveal a pane that looks like the following: 4. ......

Posted On Monday, September 7, 2009 2:51 PM | Comments (1) | Filed Under [ Silverlight ]

Powered by: