Silverlight Tip – How to make bold text in a textblock from the CodeBehind
The Problem: You need to conditionally bold text in a text block, but you cannot find any way of doing so The Cause: For inexplicable reasons, Microsoft chose not to include a FontWeight.Bold in their xaml specification The Solution: Microsoft did include a FontWeights (note the S) class To bold text in the codebehind, all […]
How to fix updating problems in your Silverlight application
The Problem: You make changes to your Silverlight Application, but you do not see it reflected when you debug or run the solution. The Cause: While the web project portion of the solution is being compiled and run, the Silverlight project is not being built. This just happened to me recently. Visual Studio crashed and […]
How to fix strange errors in silverlight web services
The Problem: You upload your wonderful Silverlight application to a new server and begin to get all sorts of strange errors, most notably something like this Message: Unhandled Error in Silverlight 2 Application An exception occurred during the operation, making the result invalid. Check InnerException for exception details. at System.ComponentModel.AsyncCompletedEventArgs.RaiseExceptionIfNecessary() at StronicoMain.ServerUtil.AddressTypeListCompletedEventArgs.get_Result() at StronicoMain.Page.proxy_AddressTypeListCompleted(Object sender, […]
How to fix margins in silverlight
The Problem: You try to set margins the same way in xaml as in xhtml/css. The Cause: The margin property in xaml is different than the margin in xhtml/css The Solution: Use this bit of info: the margins in xaml go left,top,right,bottom, or clockwise from 9:00. This was hardly the most significant problem I had […]
How to fix “Value does not fall within the expected range” error in Silverlight
The Problem: Your code goes about it’s merry way, adding children to parents and so forth when you get the error Value does not fall within the expected range The Cause: The problem is caused by two objects having the same name in the same parent. If your canvas has two StackPanels named “spOverlap” then […]
How to solve Unhandled Error in Silverlight Application Code: 2104
I’ve found that I get this error every time I upload a Silverlight application to a new webserver. IIS does not have the correct settings by default. The Problem: You ftp a Silverlight App to an IIS website, go to the website in a browser, and get the following error: Message: Unhandled Error in Silverlight […]
Silverlight Data validation problems
So – I spent today making one last ditch effort to get the built-in Silverlight data validation to work in my project, all to no avail. I even posted a question on Stack Overflow, and have yet to receive an answer, which is a first for me. I downloaded several of the samples, from Wildermuth, […]