Windows 8

Thoughts about WinRT, Windows 8 and more.

Using the predefined buttons styles for the ApplicationBar in Windows 8

When you create a new Windows 8 application, the Common folder contains a file named StandardStyles.xaml. Amongst other styling resources, this file contains a trove of application bar buttons styles, including Microsoft Design-like icons. In order to use these styles, however, you need to uncomment the corresponding one. Microsoft commented these styles out, because otherwise they would be instantiated by the XAML parser when the app starts, which would cause some delays and use unnecessary memory. ......

Session material from TechDays BE and NL

UPDATE: Added the videos Note: Like all material on this blog, this blog post and all the referenced material are licensed under the Creative Commons Attribution 3.0 Unported license. You are free to reuse material from this post and from the referenced material, but you must attribute this material to me, and link to this blog post, or to my website. Thanks! I had the chance to be invited again to speak at TechDays in Belgium (Antwerp) and in the Netherlands (The Hague), and delivered 3 sessions ......

MVVM Light V4.1.27.0 in Nuget

I just pushed a new version of MVVM Light to Nuget. The new version is 4.1.27.0. The difference towards the previous version (4.1.26.1) and this one is that I am not depending on the CommonServiceLocator Nuget package instead of providing my own.

Read the rest of this entry »

Using async/await with WebClient in Windows Phone 8 (or: TaskCompletionSource saves the day)

When you share code between Windows Phone 8 and Windows 8, you can use async/await to code against asynchronous APIs, which is a nice step in the right direction. However there are Windows Phone APIs that do not support async/await yet. Probably the most annoying to date is the WebClient (which in Windows 8 has been replaced by a better API called HttpClient). Read the rest of this entry » ......

2012 in review

It seems it was only yesterday that I was writing about starting my 4th year at IdentityMine, and here we are now, more than a year later. The year 2012 has been particularly interesting for all of us in the tech space, and particularly for us who are observing the Microsoft brand. Now, those of you who know me also know that I am an undying optimist (something that is sometimes mistaken for fanboism), so I will make a big effort in adding a dose of realism into this billet. Nonetheless I think we ......

MVVM Light V4.1.26 change log

I just published the change log for MVVM Light V4.1.26, which is available on Nuget only at this time. The full version is available here, while the “libraries only” version is available here. I am working on an installer which will also add a few more changes to the templates and one bug fix in the code snippets. Stay tuned for that installer as soon as I figure a few things out. Important note: V4.1.26 is only available on Nuget (here and here) at the current time. An installer will be published ......

Oredev 2012: Summary and source code

This week, I had the pleasure to be invited to talk at Oredev, a really cool conference taking place in Malmo, Sweden. The whole event is awesome, including a very special dinner on Monday including sauna and swimming in a 6 degrees cold Baltic sea, and a reception with dinner at the town hall, including the mayor himself. Considering Malmo is a town of 300'000 inhabitants, it is a pretty nice occasion and the historical building itself is really worth seeing. For those interested, I placed my pictures ......

MVVM Light V4.1 with support for Windows Phone 8

Today is a very exciting day: After the official release of Windows 8 (and Microsoft Surface!) on Friday, and the official release of Windows Phone 8 on Monday, the Build conference is starting! This is the conference in which we will learn all about the developer experience for Windows 8 and Windows Phone 8. As a partner of Microsoft, I had the privilege of trying out some of the new things early, and this gave me the opportunity to port MVVM Light to Windows Phone 8 (it was already running for ......

“Using the MVVM pattern in Windows 8” in MSDN Magazine

These days I am swimming in Windows 8 code, and I must say it is a good feeling. This gives me the occasion to push MVVM Light and a few other components of mine to their limits, and to fix or improve a few things on the fly. All this goodness will be available in V4.1 which is scheduled shortly after Windows 8 launch. In spite of the busy schedule, I couldn’t resist writing an article for MSDN magazine about, you guessed it, the MVVM pattern and MVVM Light in Windows 8. It is an article that goes ......

Adventures in Windows 8: Working around the navigation animation issues in LayoutAwarePage

LayoutAwarePage is a pretty cool add-on to Windows 8 apps, which facilitates greatly the implementation of orientation-aware (portrait, landscape) as well as state-aware (snapped, filled, fullscreen) apps. It has however a few issues that are obvious when you use transformed elements on your page. Read the rest of this entry » ......

Adventures in Windows 8: Solving activation errors

Note: I tagged this article with “MVVM” because I got a few support requests for MVVM Light regarding this exact issue. In fact it is a Windows 8 issue and has nothing to do with MVVM Light per se… Sometimes when you work on a Windows 8 app, you will get a very annoying issue when starting the app. In that case, the app doesn’t not even start past the Splash screen. Putting a breakpoint in App.xaml.cs doesn’t help because the app doesn’t even reach that point! Read the rest of this entry » ......

Adventures in Windows 8: Understanding and debugging design time data in Expression Blend

One of my favorite features in Expression Blend is the ability to attach a Visual Studio debugger to Blend. First let’s start by answering the question: why exactly do you want to do that?

Read the rest of this entry »

Adventures in Windows 8: Placing items in a GridView with a ColumnSpan or RowSpan

Currently working on a Windows 8 app for an important client, I will be writing about small issues, tips and tricks, ideas and whatever occurs to me during the development and the integration of this app. When working with a GridView, it is quite common to use a VariableSizedWrapGrid as the ItemsPanel. This creates a nice flowing layout which will auto-adapt for various resolutions. Read the rest of this entry » ......

#mvvmlight V4 update for Win8 RTM

With Windows 8 RTM out of the doors (at least for some of us), it was also time to create an update to MVVM Light. I selected the V4 RTM to do this (V4.0.23).This RTM version was released a few weeks ago with no much bells and whistles because I was just too busy to write much about it. Now after some vacation, I will resume blogging on all my favorite topics including of course MVVM Light. Read the rest of this entry » ......

#mvvmlight V4 for Windows 8 RP is available

I took a moment out of a very busy weekend to publish an update to MVVM Light for Windows 8 Release Preview. Read the rest of this entry » ......

Fixing the certifications issues for the Windows 8 App Store and #mvvmlight

If you used the latest MVVM Light version for Windows 8, you may have noticed that a couple of issues cause your app to fail the Windows App Certification Kit. It is really quite simple: By mistake, I published the debug version of the assemblies instead of the release version. This causes the certification to fail. Read the rest of this entry » ......

Celebration! 120’000 downloads for #mvvmlight, 2 copies of Expression Studio to win

That is a symbolic milestone: Last week, MVVM Light reached the bar of 120’000 downloads on http://mvvmlight.codeplex.com, the site that has been hosting source and installers since the beginning of the project (100'000 downloads) and on Nuget, the popular package manager for .NET (20'000 downloads). More information about Nuget and MVVM Light. Read the rest of this entry » ......

Metro design inspiration

[This is the English version of an article I wrote for the Netzwoche publication in Switzerland. This is part 2 of a 3-parts article about Metro. The original article in German can be found online on the Netzwoche website.] With Windows 8, Microsoft is going to potentially install their new design language called Metro on a massive amount of computers of all shapes, from thin low-powered slates to full scale PCs. However Metro was not born overnight and in fact a lot of research was put into it. ......

ICommand issue in Windows 8: Correction!

Well I'll be… I stand corrected! I recently published a blog post stating that you need to declare a command as ICommand (instead of RelayCommand) if you want it to work in Windows 8. I even went as far as to modify the MVVM Light code snippets that are used to create commands. Read the rest of this entry » ......

#mvvmlight V4RC available on #nuget

I just published the MVVM Light V4 RC packages to Nuget. Note that this is still technically a preview, so the main package is still V3. The V4 packages are available here:

Read the rest of this entry »

Declaring an ICommand in Windows 8 Consumer Preview

[Update 24/4/2012]

Well I'll be… after I posted this, a few people wrote to me and told me they are unable to repro the issue. I then tested again and indeed, it works. No idea why I couldn't get it to work in the first place.

More details here. Sorry about the confusion people!

Slides and source code for my past talks this year

I had the chance to be invited to talk at various conferences this year already, and I promised to post the slides and source code, so here it is!

Read the rest of this entry »

Fixing the #mvvmlight code snippets in Visual Studio 11

If you installed the latest MVVM Light version for Windows 8, you may encounter an issue where code snippets are not displayed correctly in the Intellisense popup. I am working on a fix, but for now here is how you can solve the issue manually.

Read the rest of this entry »

How to work around a possible XNA Game Studio or Windows Phone SDK install failure on Windows 8

I am not sure if you guys know Aaron Stebner. Aaron works at Microsoft, and has pulled thorns from my side many many times already.

Read the rest of this entry »

The gestures of Windows 8 (Consumer preview): part 2, More about Search

This is part 2 of a multipart blog post about the gestures and shortcuts in Windows 8 consumer preview. Part 1 can be found here!

Read the rest of this entry »

The gestures of Windows 8 (Consumer preview): part 1

This blog post started as a simple one, but grew to be quite large and time consuming. I am splitting it, because I really want to publish the first findings already. Stay tuned for more! I am sure that you heard that Windows 8 was released last week in an early although quite stable stage called "consumer preview". Windows 8 is an interesting mix of touch-based and mouse/keyboard based system. Some aspects are a bit annoying (see my post about the "split personalities" in Win8 to see what I mean!) ......

Impressions, slides and code from TechDays Belgium and Netherlands

Update: Posted the video of “MVVM Applied” below.

This week I was “on tour” in Belgium and Netherlands and presented 3 times:

Read the rest of this entry »

Solving the ObservableCollection bug on Windows 8

If you tried to build applications for Windows 8 with XAML/C#, you may have noticed an annoying issue: If you have a list controls (for example a GridView) and you bind the ItemsSource property to a property of type ObservableCollection on your ViewModel, the GridView is not updated when the collection’s content changes. The CollectionChanged event is raised properly, but it is not honored by the binding system. Read the rest of this entry » ......

Screenshots of my #mvvm demo at #techdaysbe

Today I gave a talk in TechDays in Belgium about MVVM in Silverlight 5, Windows Phone 7 and Windows 8. This was the first time I gave that particular talk, and in addition keep in mind this is a developer preview, meaning that it is not finished, and not always stable.

Read the rest of this entry »

Quick travel tip: charging USB devices from the Samsung Slate 7

For those of you who have the Samsung Slate 7 that Microsoft gave at Build (or that you purchase yourself!), and who are travelling: I hate to take chargers for all my gadgets, especially since my Windows Phone, my Bluetooth stereo headset and my Kindle (amongst others) all use micro-USB to charge. So I just take a couple of micro USB cables and I can charge my devices from the PC. Read the rest of this entry » ......

MVVM Light Toolkit for Windows 8 (preview) #mvvmlight #win8

I was very optimistic when I first saw Metro style apps coded in C# on Windows 8, because for the most part they are not much different than the well known XAML/C# pair on Silverlight or WPF. This led me to brag a bit about probably having a port of MVVM Light ready “in a few days”. Of course I didn’t take in account that I would have a great time the week after //build in Seattle, with fantastic weather and tons of friends to have dinner and conversations with. Needless to say, the few days turned ......

Breaking change: Raising PropertyChanged with string.Empty in WinRT / Windows 8

In the developer preview of Windows 8, I just noticed a breaking change in the way that data bindings react to the PropertyChanged event.

Read the rest of this entry »

Quick tip: Killing a Metro-style app in Windows 8

Metro-style apps are very similar to Windows Phone apps. They have a similar application model (for example they can be suspended, and when suspended they can be killed by the operating system if memory is needed), so they need to maintain state. Also, and that is the topic of this post, they cannot be ended by the user in a “normal” way, i.e. there is no File / Exit menu and no “X” button in the corner. Once started, the application remains in memory until the following happens: Read the rest of ......

Quick tip: Select the correct INotifyPropertyChanged in Windows 8 / WinRT

Microsoft loves MVVM and INotifyPropertyChanged so much that they included this very useful interface twice in the new WinRT framework. Unfortunately, only one of these is working correctly (and the other one is likely a bug, remnant from the past ) Read the rest of this entry » ......

Detecting design mode in Windows 8/WinRT

One of the very useful features of the MVVM Light toolkit is to help with the creation of design time data, in order to give something to see on the design surface (Expression Blend, Visual Studio designer). This is especially useful when designing list controls such as ListBox, ComboBox, etc. Without design time data, these controls will remain empty, and the designer will not see what he is working on. This can cost a lot of time and cause frustration. Read the rest of this entry » ......

Dealing with types in WinRT

Another quick tip: Most of the interaction with the System.Type class in Windows 8 is now done through the TypeInfo class. An instance of TypeInfo for a give type is retrieved using an extension method called GetTypeInfo(). Note that since this is an extension method, it will not be visible in Intellisense unless you add a reference to System.Reflection in the “using” section: Read the rest of this entry » ......

Running unit tests in Visual Studio 2011 and Windows 8 (WinRT)

This is a quick tip, because it confused me at first. But thanks to the always excellent Tim Heuer and Peter Provost (from the Visual Studio team), here is the answer:

Usual disclaimer: This is for XAML/C#. I am not sure how this works for the other programming stacks.

Read the rest of this entry »

My Windows 8 slate has split personalities–and what Microsoft could do to improve that

I had dinner the other night with my good friend Josh Smith, and of course we started talking about Windows 8. Something he said was pretty much spot on: He said that Windows 8 feels as if it has split personalities. There are the WinRT “Metro-style” apps and there is the “classic” Desktop, which looks and feels like Windows 7++ (optimized for touch, and actually a real delight to use with my fat greasy fingers). Read the rest of this entry » ......

Quick tip: Adding objects in resources.

If you are using MVVM-Light style ViewModel creation (often referred to as “view-first”), you might have noticed that you cannot build if you have an object in the view’s resources. It means that the code below does not compile.

Read the rest of this entry »

What to do if the Bluetooth keyboard stops working? (#Win8 #bldwin Samsung slate)

At times it is quite tough to be on the bleeding edge. I have been using the Samsung slate that Microsoft gave us at the Build conference last week for about 5 days now, and in fact I even left my laptop (a Touchsmart TX2 that I like a lot but that is getting old a bit) at the hotel. One issue I had today is that the Bluetooth keyboard stopped working. I tried removing and reading it from the Devices dialog, but it didn’t work. Read the rest of this entry » ......

So did you notice? (Invisible references in WinRT apps)

Just a quick note: When you create a new WinRT application for XAML/C# in Visual Studio 11, you will notice that the References folder is empty.

Read the rest of this entry »

My thoughts about Build, Windows 8, WinRT, XAML and Silverlight

Last week, Microsoft held their long awaited Build Windows (or simply "Build") conference in Anaheim CA. About 5000 people packed the convention center to discover the latest version of the Windows operation system: Windows 8.

Read the rest of this entry »