Category Archives

Enabling / Disabling design data in Visual Studio 2015 Update 1

.NET, Blend, MVVM, Technical stuff, Universal Windows Platform UWP, Visual Studio, Work, XAML
No Comments

If like me you use design time data in Blend or the Visual Studio designer, you may have noticed a small change that is actually very convenient, but maybe not the most discoverable feature ever: You can now switch design time data on or off very easily!

To illustrate this, follow the steps:

  • Start Visual Studio 2015 Update 1.
  • (if you have not done so already) Install MVVM Light with: Tools / Extensions and Updates / Online –> Search for mvvm light and install the extension.
  • After restarting Visual Studio, select File / New Project and create a new MvvmLight (Win10Univ) application. This will create a new Windows 10 Universal project with all the MVVM Light scaffolding.
  • Open MainPage.xaml in the Visual Studio designer (or select Design in Blend from the context menu on MainPage.xaml).
  • Make sure that you set the configuration manager to x86 (not ARM or x64).
  • Build the application.

At this point, you will see one of two images below:


Figure 1: Design data is enabled


Figure 2: Design data is disabled

What’s the difference?

If you study both figures closely, you will see the difference at the bottom: Figure 1 shows actual data created in the code of the MVVM Light application (“Welcome to MVVM Light [design]” and the “Starting…” label for the Clock), while figure 2 shows the names of the databound properties (WelcomeTitle and Clock) instead. Switching from one figure to the other is done by using a new button on the design surface, which is a little hard to find. Here is an illustration:


This small button is tooltipped “Enable Project Code”.

What this button does is enable or disable a feature that MVVM Light applications are taking advantage of: The possibility to run some of your app code while the application is loaded in the visual designer. If the button is toggled on, the design time code will be enabled, which explains why the WelcomeTitle label shows the design time text, and the Clock shows the initialization text. This is useful, because it will allow you to design your app visually without having to actually run it, and so you will be faster.

On the other hand however, design time code can crash the visual designer. This type of errors can be fixed by updating the design time data, but they are time consuming, and sometimes it is just not worth it. In those cases, you may want to disable the design time code for the current view, which can be done by toggling the small button off.

In the case where the button is disabled, you can still edit the UI somehow, because the name of the property will be shown, and you can at least set the font, font size, foreground color  etc, which is better than nothing. For lists, this works too: If the design time code is enabled, the design time elements will be shown like in figure 3. On the other hand, if you disable the design time code, three “dummy” items will be created, which allows you to edit the item template visually. Here is an example taken from an app I am currently working on.


In addition, it also enables some level of design work with configurations that were not initially supported by the visual designer: ARM and x64. You can verify this by changing the configuration in the MVVM Light application above. Here the toggle button becomes disabled, and the view in figure 2 is displayed.

Having the possibility to disable design time code renders the visual designer more stable by allowing the user to eliminate possible design time error from the equation, and to still use the designer even if the design time code fails. It also allows some level of designer usage even with ARM or x64 configurations. This should accelerate things especially towards the end of the project, when maintaining the design time data can be time consuming.

Happy coding

GalaSoft Laurent Bugnion
Laurent Bugnion (GalaSoft)
Share on Facebook


IdentityMine, MVVM, Work, XAML
1 Comment
Update (10 Jan 2016) I added Techorama to the list of my talks. Hope to see many of you in Belgium!!

It’s been a tradition for me to look in my inbox for an email from the Microsoft MVP award team on January first… this year is special because it is the tenth time that I am getting the award. I am really happy and excited about this milestone, and it’s a great occasion to reflect on a decade of community work with Microsoft frameworks and tools. Getting awarded 10 times in a row is a huge honor and I feel blessed and honored.


The community work

I have always been active in the community, from my very first involvements with code, starting with many contributions to the early JavaScript community (these were the days of Usenet and the comp.lang.javascript newsgroup, and I started contributing around 1997 probably). These were exciting days because we were pretty much inventing everything, before the early days of frameworks. The very first framework we started to discuss was a horrible thing called Prototype which was making everything way too complicated. JQuery came only quite a lot later. In fact, much of what is discussed these days in the so-called SPA (Single page application) space is either stuff that we had already talked about in the newsgroup, or building on top of it. Always funny to hear again about these topics after so many years.

Professionally, I started using my JavaScript (and HTML and CSS) skills when we started an ASP.NET project around 2002, which took about 3 years to complete. Before that, most of my involvement with JavaScript had been on private time. It was an exciting time with (a) digging deeper into the .NET ecosystem (I had started using .NET with V1.0 in 2001) and (b) using my web skills for money :) It was a great project, and we innovated in many areas, using a lot of AJAX (before it was cool) and other user experience improvements.


After this project ended, about 11 years ago, I was extremely lucky to be sent to Las Vegas for MIX06 and discovered XAML… The awesome atmosphere at MIX totally pumped me up and led me to start blogging and exploring WPF for a project we were starting. One year later, someone noticed my little blog and decided it was good enough for my first MVP award… The same year Microsoft recommended IdentityMine to us for a WPF training, and I discovered this incredible team of developers and designers (and PMs!) whom I now call my friends, and this amazing place, PNW which feels like my second home…

It was a wild ride for sure. My explorations led me to make friends with a lot of developers within and outside of Microsoft, get very involved with the development of some awesome products like XAML and Blend, to get into the conference circuit, to write two books, to create the MVVM Light Toolkit and manage its growth, to start working with Xamarin (and get awarded an MVP there too), to get accepted in the Microsoft Regional Directors program, and more… And now I feel ready for 10 more years (and quite a few more, in fact :)

2016, public appearances and travel

At the moment I have a few conferences lining up, and a few more that I hope to confirm later on. For now here is what I know:


I will speak at TechDays Switzerland 2016 in Baden. This is exciting because it is a rebirth of the TechDays conference here, which had disappeared in the past few years. I always love TechDays as a concept. This year we will have a half day of keynotes on February 29 and one day of breakout sessions on March 1st.


I will attend the Build conference in San Francisco from March 30 to April 1st. This should be an interesting event where we might not see huge announcements but rather see a stabilization and consolidation of Windows 10 and all associated technologies. I like these years where we have a chance to dig deeper in technology, and to polish and refine our devices and frameworks.


On April 24th to 28th, I will be in Orlando FL at Xamarin Evolve. I am really excited about this opportunity to dive deep into MVVM Light for Xamarin, and specifically the databinding framework. I was very impressed by Evolve 2014 which was my first appearance at this event. It felt almost like the MIX conferences of yore, and a great place to meet a lot of interesting people in this space.


On May 3 and 4, I cannot wait to go back to Belgium for Techorama. I will be talking about Windows Presentation Foundation 4.6 and show you what’s new. Yes WPF is still important, and is widely used for desktop applications, especially in enterprise and industry. WPF was my first XAML love, and I cannot wait to share some of that love with you all!


On May 26th-27th, I will be at DevSum in Stockholm Sweden. First time at this smaller conference but I heard so many great thing about it that I am impatient to try it out. Thanks Tibi for having me :)

That’s what is confirmed for now. There is a little more being discussed at the moment, and I will announce it when the time comes. As always, I am really proud and happy to have a chance to talk to an audience about the topics that excite me, and to have the possibility to meet and chat with many of you face to face.

Happy coding!

GalaSoft Laurent Bugnion
Laurent Bugnion (GalaSoft)
Share on Facebook

Solving the issue where unexpected languages appear when you submit to the Windows 10 Store (#mvvmlight)

MVVM, Technical stuff, Universal Windows Platform UWP, Windows 10, Work
No Comments

Ah the joy of developing for new platforms :)

Over the past few weeks, I received a few bug reports where an application that was supporting only one, non en-US language was receiving some errors when being submitted to the store. In short, the store thought that the application was bi-lingual (original language + en-US) and asked for all the assets (description etc) in en-US as well. Needless to say it is no fun for the developer who has to prepare all the assets in en-US at the last minute.

This issue was described here in the CommonServiceLocator library. And unfortunately, because MVVM Light has a dependency on this library, it can also occur in MVVM Light applications too.

It’s a bug!

After reporting the issue to Microsoft, and having one member of the team spend some time on it (thanks!), it so happens that it is due to a bug in Visual Studio 2015. This is a regression in the handling of portable class libraries. And what’s great is that (while waiting for the bug to be fixed), there is a workaround:

  • Open your application’s CSPROJ file in a text editor.
  • In the first PropertyGroup of the project, add the following line:

This line will prevent the bug from happening, and you should be able to submit your app to the store as usual.

Happy coding!

GalaSoft Laurent Bugnion
Laurent Bugnion (GalaSoft)

Share on Facebook

One million downloads!

MVVM, Technical stuff, Work, Xamarin, XAML

Logo MVVM Win8 Purple 103x80

I am not sure exactly when it happened but as I was reviewing the MVVM Light Toolkit’s download numbers, I suddenly realized that we are now over a MILLION downloads.

The breakdown of the downloads is as follows:

TOTAL: 1’130’704 downloads

Read the rest of this entry »

Source code and samples for the ADC15 talks

ADC, HoloLens, MVVM, Technical stuff, Windows 10, Work, Xamarin

I just published the material for last Monday’s Advanced Developer Conference in Frankenthal Germany.

Read the rest of this entry »

Upcoming speaking engagements and travels!

.NET, IdentityMine, MVVM, Technical stuff, Visual Studio, Windows 10, Work, WPF, Xamarin, XAML
1 Comment

Wow it’s autumn already! When did that happen? The Summer was very busy, with a lot of super interesting work at IdentityMine, the release of MVVM Light V5.2, and preparation for an upcoming article in MSDN Magazine (more about that later) and even some work on some personal apps I wanted to port to Windows 10 and improve.

In the coming few weeks, I have some travel coming up, with speaking engagements. Here is the list below, and I will update it if something new comes up. I really hope to have a chance to see you at one of these talks, and if you do come, please come say hi and let’s chat!

Read the rest of this entry »

MVVM Light V5.2 is live!

.NET, Blend, MVVM, Technical stuff, Universal Windows Platform UWP, Windows 10, Xamarin, XAML

This week I published MVVM Light V5.2 to Nuget and to the Visual Studio Gallery.

There are a few highlights which are described as always in the Change Log. See further below for a more detailed explanation of some of the changes.

Read the rest of this entry »

Using compiled bindings (x:Bind) with #mvvmlight

Build, MVVM, Technical stuff, Universal Windows Platform UWP, Windows 10, Work, XAML

One of the XAML-related announcements at Build this year was the availability of compiled bindings. These new bindings can be used instead of the “classic” {Binding} syntax in XAML. Note that this syntax is only available in Windows 10 universal applications, not in WPF yet.

The advantage of compiled bindings over normal bindings is that (wait for it) they are compiled. So there is syntax check by the compiler when you build your project. Also, the bindings will be resolved much faster because they do not rely on reflection during runtime.

Read the rest of this entry »

#Techorama 2015: Slides and source code are online!

MicrosoftBand, MVVM, Technical stuff, Techorama, Work, Xamarin
No Comments

Techorama was a real pleasure. I have to admit I was a bit tired from all the travel (I had just come back from 2 weeks in the US a couple of days before flying to Brussels) but I was super happy to go because I know how well organized this conference is. They love their speakers, and we love them back.

Read the rest of this entry »

Using #mvvmlight with Windows 10 universal applications

.NET, Blend, MVVM, Phone, Technical stuff, Universal Windows Platform UWP, Windows 10, Windows Phone, XAML

Yesterday, Microsoft released to the public the development tools for Windows 10 (technical preview). With this release, you can start developing applications targeting the universal application platform (UAP).

Of course MVVM Light is present on this new platform too and allows you to build decoupled applications with the MVVM pattern. More than ever, XAML and the data binding system allow you to build applications in a fast and comfortable manner for a large number of devices with Windows 10.

Read the rest of this entry »