BuildWindows11

Notes from the Build conference 2011

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. ...

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. However some laptops are cutting off power from the USB ports when they go to sleep. I thought it was the case with ...

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: The app is in suspended ...

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. First a bit of background: Often, objects that are databound to the UI are simple data objects (also called ViewModels) that implement the INotifyPropertyChanged interface. This interface is very simple and defines just one event, the PropertyChanged event, that needs to be raised by the ViewModel when one of its property changes. It is what makes the ViewModel ...

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 ) When implementing INotifyPropertyChanged, make sure that you select the correct one! The one you want to use is into Windows.UI.Xaml.Data. The old one, the one you DON’T WANT is into System.ComponentModel (the same namespace it was in WPF and Silverlight). ...

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. Detecting design mode was always incompatible ...

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: // Needed for the extension method using System.Reflection; (...) var info = myType.GetTypeInfo(); // Was: string name = ...

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. Creating unit tests for your WinRT application/library Start Visual Studio 2011. Create a new project. From the Add New Project dialog, select Unit Test Library (In the Visual C#/Windows Metro Style category). Give a name to the project ...

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). Side note: I really dislike more and more the name “Metro-style” for the WinRT apps. ...

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. <UserControl.Resources> <vm:MyViewModel x:Key="MyViewModel" xmlns:vm="using:Application... /> </UserControl.Resources> <UserControl.DataContext... <Binding Source="{StaticResource MyViewModel}" /> </UserControl.DataContex... I was ...

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. In order to re-add it in a clean way, this is what I did, and it worked: ...

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. Well don’t fret, it is absolutely normal. Microsoft decided that all the WinRT assemblies are always referenced by default, and thus is doesn’t quite make sense to show them in the Solution Explorer. You will see in this References folder only your own referenced assemblies, third party libraries, etc. Microsoft is looking for feedback. Is it confusing you? ...

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. This is a very major iteration (much more than the Windows Vista –> Windows 7 transition) (and also, it is an early preview so it is quite unfinished ;) As such, we will definitely need a bit more time to play with it before we can express a truly informed opinion. Of course ...

//build conference in Anaheim: Keynote notes #bldwin

As usual when I attend a conference, I like to take quick notes to remember what it was all about and take some time later to analyze it. Since Windows 8 is going to be the next big things, let me share my notes with you! Today is a launch Start by talking about Win7 450000000 copies of win7 sold Win7 usage is finally greater than XP usage 520’000’000 people using Windows Live services World of computing is changing especially since 1995, last big Windows overhaul Touch is very important in Win8 ...