24 posts categorized "Web/Tech"


An Awesome Year 2015

It’s going to be an awesome year 2015.



Windows 10

On January 21st we’ll see an awesome Windows 10. At least the build is named FBL_AWESOME, but I think it’ll be really awesome.

The next chapter on Windows 10 is about the consumer experience.

Professional C# 6

I’m working on the 10th edition of Professional C#. The 10th edition – can you imagine? The first edition I’ve done was using Beta 2 of .NET 1.0. Since the first edition many things happened, and now big changes for .NET coming.

The new edition will be a major update of this book with a reduced page count. A reduced page count! One option of this book would be to increase it to 2500 pages, but I finally decided to decrease the page count and get rid of all the legacy stuff. You’ll only find new things in the book, e.g. ASP.NET 5 but not the old version of ASP.NET MVC, Web API… So keep Professional C# 5 around for all the old stuff. For Windows Forms you even need an older edition of this book. When did I remove this part?

The new edition of the book covers the new language features of C#, the new core runtime, ASP.NET 5, Windows Universal Runtime Apps (or what it may be called) for Windows 10…

Many samples of the book will not only run on Windows but also Linux and Mac – of course not the part covering Universal apps.

Windows Azure

Week by week, more and more features are coming to Windows Azure.

All my websites are running on Windows Azure Websites, using storage options offered by SQL Database and blob storage. My productive apps make use of Windows Azure Mobile Services as well as the Bing Search API from the Azure Marketplace.

My source code is stored within Visual Studio Online (using Git), and the Office suite I’m using of course Office 365.

Updated versions  of my apps (coming soon, but I don’t make a date promise) are making use of DocumentDB and Azure Search.

Some important dates:

For a Windows Azure event in Vienna, reserve the date: 12-February! More information coming soon!

At Basta! in Darmstadt (24-February) ‘m talking about different storage options with Windows Azure.


A new version of Picture Search is in progress. The new version will not only be available for Windows, but also for Windows Phone, iPhone and Android – and it will have higher limits for free image searches. I’m doing this with Xamarin.

Menu Card and Kantine are other apps coming for multiple platforms. Menu Card will have a major redesign on the server and many new features on the client.

Courses, Workshops

As in previous years I’m teaching courses and workshops, just new technologies are offered. Of course C# 6, .NET Core, ASP.NET 5, and Windows 10 apps will have a big focus. You can also learn Xamarin.Forms.

What’s new is that I’m not only offering company workshops, you can also register to open courses directly at my Website. Starting with Windows Store Apps with XAML and C# and Advanced Windows Store Apps using C# and JavaScript in January!

Hope to see many of you this year!


A Happy New Year to all of you!


CN innovation

Image © Ivelinr | Dreamstime.com - Awesome Evaluation Form Photo


A Happy New Year 2014!


Years with 4 different digits :-)


In the year 2013 the first blog of the year was about

  • Many new Windows Store apps
    • Yes, there are many more Windows Store apps. Probably some you are wishing for are not here, yet. Probably others don't have the same features as on other platforms. But definitely, there are many more Windows Store apps! Which one are you missing?
  • Faster updates for Windows, Windows Phone, Visual Studio
    • Yes, updates are coming a lot faster. We have Windows 8.1, Visual Studio 2013 (there have been 4 updates for Visual Studio 2012), and more updates are on the way.
  • C++11 and TypeScript
    • Yes, C++ is active again. C++11 brought great new features. Now, C++14 is on its way for some more changes. TypeScript reached the Beta stage on 5-Dec-2013 (Version 0.9.5). It's nearing the first release.

What I'm expecting from 2014?

Of course it's out of question that cloud usage will increase, and it will become the norm to create apps for mobile devices first. However, here I would like to take a look at some specific Microsoft technologies.

C# 6

Mads Toergesen already talked about the Future of C#. At the NDC London conference he introduced some great features of the upcoming C# language. With Roslyn in the home stretch, it should become easier to add language features. C# 6 doesn't seem to have a feature as big as generics, LINQ or async, but many smaller ones that come very handy, such as

  • Primary Constructors
  • Readonly auto properties
  • Exception filters
  • Static type using statements
  • Property Expressions
  • Method Expressions
  • Params for enumerables
  • Monadic null checking
  • Constructor type parameter inference
  • Inline declarations for out params

It's not clear yet what and when it's really coming. But for sure there are some great C# enhancements in the time to come. A list of these extensions with comparisions how to write code today is described in the blog post of DaminG. Mads Torgersen himself gives some great information about C# and Roslyn at .NET Rocks.

M#, Between C++ and C#

Let's continue with C#. There are other talks about a new language (code name M#) that is based on C#. It just sits between C++ and C#: C# for Systems Programming with safety and productivity similar to C# and performance like C++. Joe Duffy has a blog post of this new language and its goals. Some highlights:

  • Aggresively stack allocate objects, deterministically destruct...
  • Elements of C++ const (with safety), immutability, isolation
  • Async programming at scale
  • Type-safe system programming, easily carve out sub-arrays and sub-strings without allocating
  • Modern error model with fail-fast as the default prolicy, exceptions for rare dynamic failure, typed exceptions only when rich exceptions are needed 

Project Midori

The language M# was developed together with the operating system Midori. First from Microsoft Research, it was quiet for some years now around this new operating system. Now Mary Jo Foley has some information about Midori. If parts of it can be found in the next Windows system, or it takes a completely different roadmap, it's interesting in any case.

Microsoft "Mod"

Mary Jo also writes about Microsoft Mod as Microsoft applies for a trademark. I'm not sure about this name (does it really sound good in your language?), and as Mary mentions, "Microsoft applies for many trademarks it never ends up using commercially or publicly". However, it's interesting what's behind this, and there's already an ongoing discussion about Office as Windows Store apps. Of course, Microsoft Office is available on Windows RT as a desktop application. OneNote is already available as a Windows Store app, and it's great, using it a lot. I'm expecting other parts of Office to be available as Windows Store apps as well.

Microsoft Project Siena

A Microsoft Windows Store app that is already available in the store is Microsoft Project Siena. This allows easily creating Windows Store apps. Is this the new Visual Basic? This app shows some more ways what's all possible with Windows Store apps. I'll try to create a real app using data offered by the Menu Card app very soon.

Windows Azure

The Menu Card app just mentioned makes use of several Windows Azure features: Mobile Services, SQL Azure, Storage, and the source code is managed with Visual Studio Online. The least year many new features were added to Windows Azure. I expect enhancements in a similar fast pace in 2014. Waiting for some cool new features with Mobile Services :-)

Build Windows

Let's see what new things we'll see at Build 2014 in San Francisco, the annoucement from Steve Guggenheimer mentions news about Windows, Windows Phone, Windows Azure, Windows Server, Visual Studio and much more :-) 


With all this to come


I wish you all

A Happy New Year 2014!

Live long and prosper!




Tiles, Toasts, and Notifications in Windows Store Apps

Samples for my sessions from TechEd North America and TechEd Europe! I hope you enjoyed the session!

This sample shows tiles, toasts, badges, secondary tiles:

Tiles and Toasts Sample

And here are the sample to show different versions for push notifications:

Push Notifications


Watch this space for more information on developing Windows Store apps with Windows 8 and Windows 8.1!


A Happy New Year 2013!

2013 – the first year with 4 different digits since…. since 1987!

My previous blog article was about 2012. What can we expect from 2013?

German Version


Windows 8 was the start in a new era. Applications are becoming easier, specialized for a feature. Touch is an important aspect of the new applications. Focusing them to specific features makes them easier to use. However, with such smaller apps, communication between apps is becoming more and more important.

The new Microsoft design not only influences Windows Store apps, but also desktop apps (btw, desktop apps can be found by the Windows Store, and Windows Store apps can be installed without the Windows Store by using sideloading).

Windows 8 is becoming a cool operating system only with its apps. For 2013 I’m expecting many new apps; not only consumer apps but also LOB apps. Some of the LOB apps were already shown at the last Build conference, e.g. apps from SAP, Citrix, Hyland, Greenway Medical, and others. With the start of developing LOB apps for Windows 8, I’m expecting to see many new usability ideas. This is for accounting apps as well.

It will take some time before the desktop can be fully replaced by Windows RT. The year 2013 will bring some progress to this, but of course the desktop will stay important in 2013. Talking more time, the new UI will win. In reality, many users nowadays don’t need more than Windows RT. With more apps, Windows RT is becoming the future.

Many new Windows Store apps in 2013

Windows Blue was already discussed. What’s really behind Windows Blue we’ll see in 2013. No matter what this code really means, I believe in faster update cycles. Windows Azure is a front-runner with this to bring new features every quarter. Visual Studio is running with a faster update pace as well since the release of Visual Studio 2012. Windows should deliver faster updates, as well.

Last year, Microsoft introduced Windows Phone 8. With this phone update, the operating system for the phone is similar to the one for the desktop. In reality it’s not the same, but became more similar. With Windows Phone apps some features from Windows Store apps are still missing. I’m missing JavaScript project templates in Visual Studio, and some small parts like the HttpClient class (namespace System.Net.Http). I’m expecting some updates for Windows Phone in 2013 as well.

Faster updates for Windows, Windows Phone, Visual Studio

Continuing with development, at Microsoft Windows Store apps have a major focus – of course. I’m expecting updates for libraries, many new features, and features in regard to LOB apps.

JavaScript is becoming more and more important. JavaScript is not only used for client-side development, but on the server as well. Using table and blob storage with Windows Azure Mobile Services can be done using JavaScript – with the help of Node.js. Issues of JavaScript are solved with TypeScript.


C++ is becoming more important again. For 2013 I’ve already requests for C++11 workshops Smile


C++11 and TypeScript

Let’s make a move to hardware. Microsoft Surface Pro is available soon.


I’m already using a Microsoft Surface RT, running several Windows Store apps on this device. For development with Visual Studio I need a larger touch device. Hardware manufactures were not delivering powerful devices in 2012. Now some cool devices are nearby.

One powerful device is the Lenovo Thinkpad X1 Carbon Touch


another option the HP Spectre XT TouchSmart


Microsoft Surface Pro or a powerful device such as Lenovo Thinkpad X1 Carbon Touch or HP Spectre XT TouchSmart?

In 2012 I completed the book Professional C# 2012 and .NET 4.5. For 2013 I’m hoping it sells well – and I’m already working on another book. However, the time is not right to talk about this Winking smile


Professional C# 2012 and .NET 4.5

A Happy New Year 2013!

Live long and prosper!



CN innovation


A Happy New Year 2013!

2013 was a year of several Microsoft product releases: Windows 8, Windows Server 8, Office 2013, Windows Phone 8, Visual Studio 2012, SQL Server 2012, Microsoft Surface… What can we expect from the year 2013? Let’s start with a look back to 2012.

A personal look back to 2012

With my workshops, I had a huge demand for WPF workshops (that’s similar to 2011). This year also ASP.NET MVC and HTML5 was in demand – I also had some workshops to develop Windows Store Apps. Parallel Programming was a hot topic in 2012 as well.

With my own Websites, I moved to Windows Azure in 2012. http://www.kantine.at and http://www.cninnovation.com is hosted by Windows Azure Websites. Besides Azure Websites, I’m also using SQL Azure and Blob Storage for these sites.



My first Windows Store apps are in the store:

Picture Search is used for searching images via Bing Search – and sharing images, as well es doing slide shows:


Kantine (only available in Austria) shows menus of the week. The restaurant opens again on 7-January, so the next menus will be shown that day.


What can be expected from 2013? Let’s wait for the first blog entry of 2013. 

I wish you all the best in the New Year!


CN innovation


HTML 5 in Stockholm

Next week I’m giving a 2-day seminar on HTML 5 in Stockholm, covering not only semantic extensions of HTML 5 but also:

  • Geolocation
  • Video and Audio
  • Canvas
  • Messaging
  • Web Workers
  • Web Storage
  • Indexed DB
  • Offline Apps
  • Files API
  • Drag & Drop
  • Networking
  • HTML 5 Forms

This will be 2 fun days Smile

Code Samples for Download



jQuery und ASP.NET MVC Workshops

19. September und 20.-21. September gibt es in Kooperation mit Global Knowledge offene Kurse zu jQuery und ASP.NET MVC in Wien:


Rasant erobert jQuery Web-Applikationen. jQuery ist u.a. bei Amazon, Twitter, Dell, IBM im Einsatz. Bei Microsoft Tools ist jQuery bereits Bestandteil von Web Applikations-Templates Visual Studio. Für Visual Studio wird dabei gleich integrierte Dokumentation angeboten.

Dass jQuery die Web-Welt im Sturm erobert hat auch seinen Grund. Mit jQuery geht es ein vielfaches einfacher als nur mit JavaScript Web-Seiten zu gestalten, manipulieren, und zu animieren. Und dabei ist Browser-Unabhängigkeit gleich integriert.

In diesem Workshop gibt es einen 1-Tages Einstieg zu jQuery, Selectors, DOM, Animationen, jQuery Utility Funktionen, und auch einen Einstieg in jQuery UI. Kenntnisse von JavaScript sind vorteilhaft.


ASP.NET Web Forms oder ASP.NET MVC? Nach 10 Jahren ASP.NET Web Forms ist es Zeit für eine neue Technologie, wobei ASP.NET Web Forms sicher nicht obsolete ist. Hier haben wir zwei unterschiedliche Herangehensweisen an die Programmierung von Web Applikationen. Während es bei ASP.NET Web Forms die Zielsetzung gibt dass der Entwickler Web Applikationen möglichst ähnlich zu Windows Forms programmieren können soll, Methoden und Properties von (server-seitigen) Controls verwendet die den Windows Forms controls möglichst ähnlich sind, und HTML sowie JavaScript nicht anzugreifen braucht (was sich dann aber oft doch anders herausstellt), gibt es bei ASP.NET MVC eine konträre Zielsetzung. HTML und JavaScript (siehe auch jQuery) haben in ihrer Bedeutung wieder gewonnen, mehr Kontrolle über HTML ist oft wünschenswert. Mit C# wird server-seitige Funktionalität programmiert. Mit der Struktur die von ASP.NET MVC vorgegeben wird ist es auch gleich viel einfacher Unit Tests für die Applikation zu erstellen.

In diesem 2-Tages Workshop gibt es einen Einstieg in ASP.NET MVC 3, mit Controllers, Views, Routing, Razor und vieles mehr.

Für den 19. und 20.-21. September gibt es noch ein paar freie Plätze. Bei Interesse bitte office@cninnovation.com kontaktieren.  Firmenworkshops sind natürlich auch möglich.


CN innovation

Mehr Informationen zu meinen Web-Workshops


Taking advantage of Windows 7 with Web Pages

The Windows 7 taskbar is one of the great improvements of Windows 7. Users can pin applications to the taskbar so the application is fast accessible. The application need not to run, the application is accessible with the click of a button and thus replaces the quick launch. With the task bar the application can also offer some tasks that can be accessed from the user directly, instead of starting the application first and accessing the specific feature of the application. The .NET 4 version of WPF got an improvement that integrating the application with the task bar becomes an easy task. Starting with IE9, this is also an easy task to do with Web applications as this article demonstrates.

First, I’m adding a custom icon to the Web application. This icon is shown with IE9 in the taskbar and with the address link as the following figure shows.


If the Web application is pinned to the taskbar, the icon is displayed on the left side as well, and the back and forward buttons are colored. There’s a way to specify the color of the back and forward buttons. If the color is not specified, the color is taken automatically from the icon.


The icon can be specified in the header section of the HTML page with a link to an icon as shown. The meta elements named application-name, msapplication-tooltip, msapplication-starturl, and msapplication-window are used to configure the settings for the taskbar.

<link href="/Content/Icons/favicon.ico" rel="Shortcut Icon" type="image/x-icon"/> <meta content="CN innovation" name="application-name" /> <meta content="Information about CN innovation" name="msapplication-tooltip" /> <meta content="http://www.cninnovation.com" name="msapplication-starturl" /> <meta content="width=1024;height=768" name="msapplication-window" />

Selecting the context menu of the application pinned to the taskbar you can see information about the application as well as some links for fast access as the figure below demonstrates. This is the jump list.

The icon of the application is shown in the lowest section above the unpin and close options. These options as well as the menu to start in private browsing cannot be changed with IE9. The name of the application that was set with the application-name meta tag is shown beside the icon. With the application here I’ve also added two tasks for fast access which are Training and Books, and a custom section that lists the latest blog entries. How this is done is shown next.


Adding tasks to the task list is just a matter of adding meta tags msapplication-task. The content of this tag lists the name that is shown in the jump list, the link that should be opened on activating the item, and the icon.

<meta content="name=Training;action-uri=http://www.cninnovation.com/Home/Training;icon-uri=/Content/Icons/training.ico" name="msapplication-task" /> <meta content="name=Books;action-uri=http://www.cninnovation.com/Home/Books;icon-uri=/Content/Icons/books.ico" name="msapplication-task" />

The items that should appear above the task list can have custom section names. I’ve created a Blog section and display titles of the last five blog entries that link to these. Adding such items to the jump list is done with JavaScript. First it is verified if the Window is pinned. This can be done with the function window.external.msIsSiteMode. If it is not, and if the site is opened from a different browser, the script doesn’t need to run. A new section is created with the function msSiteModeCreateJumpList. Items to the jump list are added with msSiteModeAddJumpListItem. The parameters of this method are the name that should be displayed with the jump list, the URL that should be opened, and the link to the icon that should be displayed.

<script type="text/javascript"> try { if (window.external.msIsSiteMode()) { ext = window.external; ext.msSiteModeClearJumpList(); ext.msSiteModeCreateJumpList("Blog"); ext.msSiteModeAddJumpListItem("Sharing Assemblies between Silverlight and .NET", "http://weblogs.thinktecture.com/cnagel/2011/07/sharing-assemblies-between-silverlight-and-net.html", "/Content/Icons/blog.ico"); ext.msSiteModeAddJumpListItem("Real World .NET 4 and C#", "http://weblogs.thinktecture.com/cnagel/2011/08/real-world-net-4-and-c.html", "/Content/Icons/blog.ico"); ext.msSiteModeAddJumpListItem("BASTA! 2011 in Mainz", "http://weblogs.thinktecture.com/cnagel/2011/08/basta-2011-in-mainz.html", "/Content/Icons/blog.ico"); ext.msSiteModeAddJumpListItem("WPF ListBox Postioning using a Canvas", "http://weblogs.thinktecture.com/cnagel/2011/08/wpf-listbox-postioning-using-a-canvas.html", "/Content/Icons/blog.ico"); ext.msSiteModeAddJumpListItem("Reserve the date! Developer Day 2011", "http://weblogs.thinktecture.com/cnagel/2011/09/reserve-the-date-developer-day-2011.html", "/Content/Icons/blog.ico"); ext.msSiteModeShowJumpList(); } } catch (exception) { } </script>
In my site the JavaScript function is created dynamically by using server-side ASP.NET code to create items that reference the last five blog entries.

It will be interesting to see what features Web applications will get from Windows 8. This taskbar feature from Windows 7 is limited in the way that there is not enough place for all my important applications. Let’s see how Windows 8 changes this using Metro, and what other features Web applications can use from Windows 8.


CN innovation

How to use WPF 4 to integrate in the Windows 7 taskbar is shown in my book Professional C# 4 and .NET 4.

Information on programming Web applications in my Web programming workshop.


BASTA! 2011 in Mainz

Bei der diesjährigen Basta! in Mainz gibt es von mir gleich 4 Vorträge!


Umstieg von ASP.NET Web Forms auf ASP.NET MVC

Dienstag, 9:30

Dabei gibt es für ASP.NET Web Forms Entwickler Foundations zu ASP.NET MVC, welche Vor- und Nachteile MVC hat, wie Websites umgestellt werden können, und wie auch ASP.NET Web Forms und MVC gemeinsam verwendet werden kann.

The Secrets of Delegates

Dienstag, 17:15

Bei dieser Sessions wird einiges von Delegates aufgedeckt: delegates & events, asynchrone Features von delegates, Probleme und Lösungen zu strong references, anonyme methoden, Lambdas, Closures….

Storage mit Windows Azure

Mittwoch, 10:15

Relationale Daten oder… Diese Session gibt Einblicke neben dem Speichern von relationalen Daten in die Funktionsweise und Features von Azure Table, Blob, Queue, und Drive Storage.

C# und Dynamic

Mittwoch, 15:45

Mit C# 4 gibt es das dynamic Keyword. Hier wird dynamic im Einsatz mit COM, Reflection, der Integration zu JavaScript und Python gezeigt. Weiter geht’s mit ExpandoObject, DynamicObject…..


4 unterschiedliche Themen! Welche Session ist für dich am interessantesten?


See you in Mainz!


CN innovation


Sharing Assemblies between Silverlight and .NET

Writing WPF, Silverlight, and WP7 applications it could be useful to share assemblies between these technologies. Since Silverlight 3 and .NET 4 it is indeed possible to not only share source code but share the same binary assemblies. While this wasn’t very intuitive to do with Visual Studio 2010 and Silverlight 3 and 4, now there are separate Portable Library Tools that make this process easier. This article describes how to share assemblies with these different technologies, and the limitations.

Sharing Assemblies

With Silverlight 3 and .NET 4 the format of assemblies is the same with these two technologies. However, of course there’s a difference between the Silverlight and the .NET assemblies. To limit the download sizes that are an important aspect of Silverlight, Silverlight assemblies are reduced in functionality compared to the .NET Framework. The .NET assemblies of Silverlight not only have fewer types included, but the types also have fewer members. For example, a simple core type such as the Enum class offers GetNames and GetValues methods to access all the names and values of an enumeration. These methods are not available with the Silverlight assemblies. A .NET programmer knowing the full-blown .NET environment switching to writing applications with Silverlight soon finds out some limitations. Writing assemblies that should be used with both Silverlight and WPF are restricted to the functionality available with both technologies.

To create shared assemblies between Silverlight and WPF it is possible to create a Silverlight class library.


Using this assembly from WPF is simply a matter of referencing the assembly. However, a project reference doesn’t work. A reference to the file is needed. Sharing entities or some algorithms can now be easily done with this library.

However, there’s an important limitation. Using assemblies within this shared assembly is limited to this list (for Silverlight 4 and .NET 4):

  • Mscorlib
  • System
  • System.Core
  • System.ComponentModel.Composition
  • Microsoft.VisualBasic

Information on this list is found here: http://blogs.msdn.com/b/clrteam/archive/2009/12/01/sharing-silverlight-assemblies-with-net-apps.aspx

By default a Silverlight class library has some more assemblies referenced. If, for example the type XmlWriter from the assembly System.Xml is used within the Silverlight class library, the code runs fine from a Silverlight application. With a .NET application compilation is successful as well; however running the application a FileNotFoundException is thrown as the System.Xml assembly cannot be found.


So using this feature to share assemblies between Silverlight and WPF with Visual Studio 2010 out of the box a lot of care needs to be taken for not using types or members that are not available across the different platforms.

Portable Library Tools

With the Portable Library Tools a solution to these issues is available. With these tools project settings are available to define what technologies the assemblies should be shared with, and warnings are given if types or members are used that are not available with all options.

The Portable Library Tools can be downloaded from the Visual Studio Gallery


and requires Visual Studio SP1 as prerequisite.

Creating a shared assembly, after the Portable Library Tools are installed, the project template to create a Portable Class Library is available.


With the project properties the library can be configured to define the target frameworks that should be used.


Depending on the selected target frameworks only a subset of assemblies is available that can be referenced.


The list of assemblies that is available with this tool is bigger than the list shown earlier.

  • Mscorlib
  • System
  • System.Core
  • System.Xml
  • System.ComponentModel.Composition
  • System.Net
  • System.Runtime.Serialization
  • System.ServiceModel
  • System.Xml.Serialization
  • System.Windows

However, the add reference doesn’t allow adding references to all these assemblies. This depends on the selection of the target frameworks. Changing the target frameworks to include just .NET Framework 4 and Silverlight 4, which can be done from the project properties,…


…the System.ComponentModel.Composition assembly is available as well for reference.




With the support of the Portable Library Tools sharing assemblies between different frameworks becomes easy. Just select the target frameworks, and the assemblies that can be used by the shared library is dealt with by the tool. This way it is easy to create entity assemblies and assemblies implementing algorithms that could be used across different frameworks.


CN innovation

More information in my Silverlight workshops