Seeing some strange date behaviours in SL UI components. My local culture is UK but we keep seeing US dates popping up “here and there”. Have tried setting the Language= “en-GB” in the upper most control, also setting the thread culture is not effecting across the app. Going to have to get help on this... Continue Reading →
Restyling Transitions in the Silverlight Toolkit TransitioningContentControl
(This post extends my example for using cross project merged dictionaries in Silverlight) I’m a developer, not a designer and as such using Expression Blend doesn’t feel natural and makes me feel dirty… However I had to bite the bullet to ease the restyling of the transition animation in the Toolkit TransitioningContentControl. NOTE: At time... Continue Reading →
Cross Project MergedDictionaries in Silverlight
Todd Miranda has posted a video on the use of merged dictionaries on the Learning portal of Silverlight.net (find it here). This video explains the concepts of MergedDictionaries in a very long winded way. IMHO people investigating MergedDictionaries will already know how to layout a grid, and play some simple controls, so the first 8m... Continue Reading →
Walking the XAML VisualTree to find a parent of type
To find a parent item of type T, you can use the following helper class: This can then be utilised as follows: Grid item = ((DependencyObject)childObject).FindParentOfType(); This was particularly useful when wanting to locate an invalid control from a ValidationSummary in silverlight, that was nested in an accordian panel: BIG shout out goes to Jedi... Continue Reading →
Silverlight 2: Nested user controls, data-binding and property change notification.
The Problem: The parent form is in charge. This form has a view-model which has all the relevant information loaded, know which other views have been implemented, what data those view need and how and when to display and update those views. This is the master page. Within that page you can add user controls.... Continue Reading →
.NET Debugging and Stack Trace
When debugging enable the stack trace view to see where code has been triggered from. This is particularly useful for figuring out where events have been triggered from (delegation of event handlers from multiple places etc):
Design patterns
An excellent reference for gang of four design patterns: http://www.dofactory.com/Patterns/Patterns.aspx
Silverlight MVVM and Testing
During my investigations into this crazy land I have found a few good articles (and many not so good…): http://www.cauldwell.net/patrick/blog/MVVMAndTestingSilverlight.aspx http://silverlight.net/blogs/justinangel/archive/2009/02/25/silverlight-unit-testing-rhinomocks-unity-and-resharper.aspx Both use MVVM and both use RhinoMocks, but in subtly different ways.
HTML Table to ASP.NET Table
To convert an HTML table (from a string) to an ASP.NET table: Start with an HTML table: Create a Helper class: Open the HTML file, and pass the root node to the helper class: The helper class needs to be fleshed out some more, to provide support for other elements and valid HTML, but it’s... Continue Reading →
Asynchronous Lambda Method calls
You won’t get any benefit using this code, but it makes for more manageable source. So from Pete Browns blog: All network calls in Silverlight are asynchronous. The proliferation of event handling functions this can cause just makes for really cluttered code. Using lambda expressions seems to make my code a bit cleaner. (You can... Continue Reading →