Posted Wednesday, November 27, 2013 by Nigel Sampson
In the last few months Windows 8.1 has been released and I’ve had a few questions about Caliburn.Micro and where it stands. Also Caliburn.Micro is releasing an alpha of a new version announced by Rob.
The current version of CM for Windows 8 will work with Windows 8.1 with one issue that I know of. In 8.0 we didn’t have access to the binding infrastructure, especially GetBindingExpression which is how CM determines if a property is already bound. We had to use a pretty nasty hack to get around this, with the changes in 8.1 this nasty hack doesn’t work.
What this means is that if you have an element that could have a convention applied to it by CM but there was already a binding in place CM under 8.0 would skip applying the convention and respect your binding, under 8.1 this won’t happen and CM will happily overwrite the binding with the convention. Not a nasty bug as long as you’re aware of it.
Thankfully in 8.1 we can now do away with our nasty hack and new versions should work well. Speaking of new versions, the current git repository on Codeplex contains the code for the 8.1 version of CM which is still undergoing testing but it doesn’t hurt to take a look at.
From the 8.1 perspective it includes the following:
- Removal of the Callisto dependency in favor of the new Settings Flyout control.
- Removal of the Windows.UI.Interactivity dependency in favor of the new Behaviours SDK from Microsoft.
- Conventions for the new controls such as DatePicker, Flyout, CommandBar and many more.
- Usage of the underlying improvements to the xaml framework for binding including UpdateSourceTrigger.
It’s also available as a pre-release package in Nuget.
Please bear in mind that at the same time CM is making a more to a more portable approach, therefore to keep up with Semantic Versioning this next release will be 2.0 and will definitely contain breaking changes.
Posted Tuesday, October 29, 2013 by Nigel Sampson
Interactive Extensions is a fantastic library from the team that brought us Reactive Extensions, in fact it supports a lot same operations on IEnumerable that Rx brought to IObservable.
The best way to think about it is that it's a library that takes Linq to the next level, there's a nice summary at Interactive Extensions for LINQ to Objects.
However while Ix has been available as a Portable Class Library for a while now it didn't include the appropriate flags for WinRT development. But now it does! Checked in last month to the source was an update to allow it to be used in WinRT, it's not yet published to nuget but I'd highly recommend checking it out.
Posted Monday, October 21, 2013 by Nigel Sampson
Many people including myself have talked about the dangers of async void methods in your Windows 8 application. The fact that exceptions in these methods ultimately caused the application to crash was a big problem, realistically though trying to build a proper application with no async void methods is an exercise in futility. There are ways to mitigate the problem, from replacing the Synchronization Context like we do at Marker Metro, IL Weaving using Fody to plain exception handlers in every async void method.
Thankfully in appears that in Windows 8.1 some of these problems have been alleviated, you’ll notice now that exceptions throw in async void methods will now be passed to the Application.UnhandledException event. There if you set the event arguments Handled property to true you can recover your application from perhaps an unnecessary crash.
protected override void OnUnhandledException(object sender, UnhandledExceptionEventArgs e)
e.Handled = true;
All in all I love these little updates to WinRT, here’s hoping we can find some more of them.
Posted Tuesday, October 1, 2013 by Nigel Sampson
Lately after having some technical trouble with my previous website host as well as some unrelated issues with my DNS provider I've just completed a successful migration to Azure Websites for hosting and DNSimple.
From my experiences so far I'd highly recommend them both with no reservation.
Posted Saturday, September 21, 2013 by Nigel Sampson
It's been a busy couple of months which means I haven't posted as much as I'd like. Part of which was because I was preparing to speak at Tech Ed New Zealand.
The talk "Charming Windows 8" is a demo heavy session where I go through the four charms of Windows 8, Search, Share, Print and Settings. Show examples of them all in the built in apps and how to build them all into your own applications. I encourage you to check it out.
It's available to view on Channel 9 under Charming Windows 8, the slides are available to download on Skydrive and the source code for the demo is on GitHub. Enjoy.