Live Fast, Code Hard, Die Young

Posts tagged ‘xaml’

Windows 8 is here!

Feeling pretty excited after watching the keynote announcing Windows 8 today!

First and foremost it erases all doubts people have had about Silverlight/XAML going away. It’s not going away but instead it is becoming a primary and native technology for developing Windows apps. Another cool thing is that XAML is no longer restricted to .NET but it can also be used from C++ if you need to squeeze out that extra performance in your app. In addition to this you can also write apps using HTML5 and Javascript to run natively on Windows using the same new WinRT APIs. This is great because all those different technologies are good in different situations. To be able to choose the one you like is excellent. To me, it’s like Christmas!

Not only is this a great platform to build stuff for, but it also feels great that you can use the awesome tools Visual Studio and Blend to do it!

All in all, I just wanted to make a quick post about this because it’s such great news. Windows 8 has a lot of new cool features that I recommend you check out.

The preview version of Windows 8 will be available later tonight from http://dev.windows.com so make sure you try it out!

Advertisement

Problems with compiling XAML in Silverlight

Just recently we had some problems compiling XAML files in our Silverlight project. The files had been copied from one project to another class library and after renaming and refactoring the namespaces we still got compilation errors. The error we got was something like this:

The name ‘xxxxx’ does not exist in the current context

Visual Studio was complaining about code in our codebehind file. Apparently it could not find the controls that we had in our XAML although we were absolutely sure that they were there…

It turned out to be quite simple to solve. When we copied the files between projects Visual Studio changed the build action to “ApplicationDefinition”. This is clearly not right (may be a bug in VS2010). User controls should have a build action set to “Page” like this:

image

I hope this helps!