.NET & Funky Fresh

Syndication

News

  • <script type="text/javascript" src="http://ws.amazon.com/widgets/q?ServiceVersion=20070822&amp;MarketPlace=US&amp;ID=V20070822/US/bluspiconinc-20/8001/8b68bf4b-6724-40e7-99a5-a6decf6d8648"> </script>
Porting NHProf from WPF to Silverlight – Day 4

On Tuesday I spent a decent amount of time fleshing out the last remaining features under the Options menu. I then did some general reorganization to the project structure. Along with the port to Silverlight, I’ve been upgrading the application to use Caliburn 2.0 which is working out exceedingly well :) In fact, some of Caliburn’s features are making it very easy to work around the differences between the WPF and Silverlight platforms. After the reorganization, I decided I would start porting over the reports.  As has been my pattern, below is a screenshot and the list of *new* issues I encountered. I’m really glad there weren’t as many as on Monday…

NHProf Day 4

  1. UpdateSourceTrigger=PropertyChanged is missing.  There are workarounds which wire for events and manually update the bindings. I used Caliurn 2.0’s C over C binding to do this automatically :)
  2. RelativeSource FindAncestor is missing. Fortunately, I replaced our homegrown grid with the Silverlight DataGrid and was able to eliminate the need for this in this scenario.
  3. Hyperlink.Tag is is missing. Strange isn’t it.  I reworked the code to use a HyperlinkButton.
  4. Binding.StringFormat syntax is different. In WPF, you escape like this Text="{Binding AverageStatementsPerSession, StringFormat={}{0:0.#},FallbackValue=0}"  but that causes a compile-time error in Silverlight.  What is worse is that it doesn’t tell you where. It just complains that there is something wrong with a markup extensions somewhere in your Xaml. I fixed it with the following change  Text="{Binding AverageStatementsPerSession, StringFormat=\{0:0.#\},FallbackValue=0}"
  5. GridSplitter is missing ResizeBehavior and ResizeDirection.  Fortunately, it seams to work pretty well without them. I have a couple of issues with this that I still need to look into though.

Posted 04-01-2010 2:36 PM by Rob Eisenberg

[Advertisement]

Comments

Josh Schwartzberg wrote re: Porting NHProf from WPF to Silverlight – Day 4
on 04-01-2010 3:24 PM

This series of posts is close to a situation I'm dealing with...  glad to see someone else struggle with the differences too!  Are you going to maintain two codebases or try to use the new code for a single codebase using the the lowest-common-denominator (Silverlight) ?

Rob Eisenberg wrote re: Porting NHProf from WPF to Silverlight – Day 4
on 04-01-2010 3:35 PM

We are going to drop the WPF version once we get the Silverlight version up and running.  

Josh Schwartzberg wrote re: Porting NHProf from WPF to Silverlight – Day 4
on 04-04-2010 5:35 PM

Wow, that's bold

J wrote re: Porting NHProf from WPF to Silverlight – Day 4
on 04-06-2010 3:24 AM

Just curious, but how are you going to "push" things to the Silverlight client? I haven't used SL much at all, but what I've heard it primarily uses WCF to fetch data...

Or will the client "poll" for changes or are you going to use something else? RIA?

Rob Eisenberg wrote re: Porting NHProf from WPF to Silverlight – Day 4
on 04-06-2010 9:32 AM

The architecture already uses a polling technique. Originally, we had designed the system to push changes to the front end, but we found out that was just not performant enough. Some time back we switched to a snapshot-based polling mechanism, so that should work nicely with the Silverlight client as well.

About The CodeBetter.Com Blog Network
CodeBetter.Com FAQ

Our Mission

Advertisers should contact Brendan

Subscribe
Google Reader or Homepage

del.icio.us CodeBetter.com Latest Items
Add to My Yahoo!
Subscribe with Bloglines
Subscribe in NewsGator Online
Subscribe with myFeedster
Add to My AOL
Furl CodeBetter.com Latest Items
Subscribe in Rojo

Member Projects
DimeCasts.Net - Derik Whittaker

Friends of Devlicio.us
Red-Gate Tools For SQL and .NET

NDepend

SlickEdit
 
SmartInspect .NET Logging
NGEDIT: ViEmu and Codekana
LiteAccounting.Com
DevExpress
Fixx
NHibernate Profiler
Unfuddle
Balsamiq Mockups
Scrumy
JetBrains - ReSharper
Umbraco
NServiceBus
RavenDb
Web Sequence Diagrams
Ducksboard<-- NEW Friend!

 



Site Copyright © 2007 CodeBetter.Com
Content Copyright Individual Bloggers

 

Community Server (Commercial Edition)