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…
- 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 :)
- 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.
- Hyperlink.Tag is is missing. Strange isn’t it. I reworked the code to use a HyperlinkButton.
- 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}"
- 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
Filed under: WPF, Xaml, databinding, Control Templates, WPF/e, .NET 3.5, Caliburn, Featured, Silverlight, NHibernate, RIA, MVVM, UI Architecture, NHProf