WinRT XAML Toolkit

There it is. No time to write about it or make it pretty, but you forced me to publish it, CodePlex, so there it is….

http://bit.ly/WinRTXamlToolkit

Tagged , ,

Impressions of Windows 8 Part 2 of 2

This is the second part of my impressions of Windows 8. You can read the previous part here.

The Impressions

  1. Windows 8 and the Cloud
  2. Using Windows 8 on a Slate
  3. Using Windows 8 on a Laptop
  4. Using Windows 8 on a Desktop
  5. Desktop IE vs. Metro IE
  6. Frustrations of Being an Early Adopter

Continue reading on http://labs.vectorform.com

This is the second part of my impressions of Windows 8. You can read the previous part here.

Continue reading

Tagged , , , , , , , ,

Impressions of Windows 8 Part 1 of 2

I have been using the Windows 8 Preview For six months now – the Developer Preview since its public release in September and more recently, the Consumer Preview that was made available in February.

I have used Windows 8 on a tablet, a touch screen laptop and an old desktop and the experience has been good on all of these platforms. I have used it for anything from developing Windows 8 Metro style apps, through typical Office applications scenarios, browsing the internet, playing games, listening to Spotify, instant messaging etc. What I have not used it much for actually is to run Metro style apps, except for the ones I was developing myself, since there are not so many available yet (around 100) and the ones available do not fit into my daily use of a tablet or computer.

I have been using most versions of Windows available in the past 20 years or so. I have also been using an iPad for a few months now. I think Windows 8 is going to be huge…

The Impressions

  1. The Desktop
  2. The (Missing) Start Button
  3. The Start Screen
  4. Metro Style Apps
  5. Windows Marketplace
  6. Next Up

Continue reading on http://labs.vectorform.com

I have been using the Windows 8 Preview For six months now – the Developer Preview since its public release in September and more recently, the Consumer Preview that was made available in February.

I have used Windows 8 on a tablet, a touch screen laptop and an old desktop and the experience has been good on all of these platforms. I have used it for anything from developing Windows 8 Metro style apps, through typical Office applications scenarios, browsing the internet, playing games, listening to Spotify, instant messaging etc. What I have not used it much for actually is to run Metro style apps, except for the ones I was developing myself, since there are not so many available yet (around 100) and the ones available do not fit into my daily use of a tablet or computer.

I have been using most versions of Windows available in the past 20 years or so. I have also been using an iPad for a few months now. I think Windows 8 is going to be huge…

Continue reading

Tagged , , , , , , , ,

WinRT/Metro Style App Data

I was trying to find out where the WinRT apps files are stored and found 3 locations. Not sure how much benefit would be in digging deeper, but this could help in debugging your or reverse engineering someone else’s applications…

Continue reading

Tagged ,

Windows Developer Camp – March-June 2012, USA, Multiple locations

I found multiple (21) free full day training sessions for Windows 8 developers – here.

A path from C/C++ to C# and back to C++

About ten years ago I started my first full time programming job. I was working on some business software written in C/C++. I say C/C++ instead of just C++ because it was written mostly in C with classes – with perhaps a few cases of inheritance or actually even only few classes – it used structs in many places to group some methods together the same way you would use classes today. The code was fairly complicated and it was just aging. The standard C libraries it used were not very rich, so if you wanted to code up something fairly straightforward – you had to dig through a lot of documentation looking for something basic only to end up implementing that list class yourself. We were using a Watcom compiler at that time and trying out Borland C++ Builder for some side projects showed it was a great improvement in that VCL provided a lot of great wrapper classes for Windows APIs making things easier. Two years later we were looking into rewriting our application or at least starting a new version and considering which tools to use – basically trying to choose between Borland C++ and C#. I was on the C++ side – it was a fairly known language, more predictable and providing intuitively higher performance, while C# was at version 1.1 and had lots of great libraries, but a bit foreign and why would anyone want to go away from the fun of using pointers, managing object lifetimes and relying on some garbage (collector)? Well, I lost – Microsoft seemed to be focusing on supporting C# and in the end it turned out to be a lot more productive than C++.

Fast forward 8 years and Microsoft says – in Windows 8 you can code using C#/VB, JavaScript or C++. Well, the word on the street is that it is so that programmers fluent in any of these languages will be able to code applications for Windows, so I guess I will stick with C#. Maybe I will look at HTML5, JS and CSS, since these seem to be getting most traction, I thought. Now, having found some limitations in the .NET/WinRT stack I have a feeling like the C++/DirectX route is the most attractive. The .NET stack might make you more productive than the JS or C++ – especially if you have been coding in C# for the last eight years and perhaps HTML5 has better graphics performance or some other interesting features, but it feels like learning C++/DirectX on top of C#/WinRT is what would allow me to cover most scenarios for writing Metro Style Apps™, so especially with some experience working on the test team for the DirectX wrappers in the Windows API Code Pack – I am hoping to have an easier start in diversifying my skills.

Continue reading

Tagged , , , , , ,

BindableApplicationBar for Windows Phone – Now On NuGet

With some help from Shawn Oster – I had the BindableApplicationBar published on NuGet. Now there is no need to search for sources or assemblies on CodePlex if you need to quickly create an MVVM-friendly ApplicationBar. Just right-click on your project and select “Manage NuGet Packages…”

image

Then search for appbar, install it and voila! You can now use the BindableApplicationBar.

Continue reading

Tagged , , , , , , ,

Asynchronous UI development in WinRT, Silverlight, Windows Phone & WPF with async/await keywords of C# 5.0

This is a reblog of my article from http://labs.vectorform.com

C# 5.0 comes with the new async/await keywords that make asynchronous code easier to write, read and maintain. This is very nice if you have properly declared methods that support this pattern and Windows Runtime (or WinRT – the API for Windows 8 Metro Style Apps) comes with a lot of these methods for long running tasks or ones of nondeterministic duration – especially in I/O or web calls. It is however completely lacking in support for asynchronous UI development, even though one of the main goals of these new keywords was support for responsive UI.

Interactive coding often introduces the need to start an operation, like an animation or a dialog box and then wait for an event before switching the state of the UI, for example: running another animation or removing a dialog. Reading this article you will learn how to do it better using the upcoming features of C# 5.0, regardless of whether you develop in WinRT, Silverlight, WPF, Windows Forms or even Web Forms. The source code that comes with this article contains a library you can use to cut the amount of code you need to write by half!

Continue reading

Tagged , , , , , ,

Another XamlParseException – “Unknown parser error: Scanner 2147500037”

Yesterday I got one of those XamlParseExceptions that do not seem to make sense. It happened after I moved most of the code from my Windows Phone application to a class library. In fact the only things I left in the application project were the App class, the Properties folder and some resources that differentiate different applications that share the library. If you want to do something similar – you can have your MainPage class defined in a library and just need to update the WMAppManifest.xml to point at its new location, eg: NavigationPage=”MyClassLibrary;component/Pages/MainPage.xaml”.

Everything worked fine except for this bit:

<i:Interaction.Triggers>
    <ic:PropertyChangedTrigger
        Binding="{Binding PageNumber}">
        <im:ControlStoryboardAction
            ControlStoryboardOption="Play">
            <im:ControlStoryboardAction.Storyboard>
                <Storyboard>
                    <DoubleAnimation ...

It kept throwing an exception:

Continue reading

Tagged , , ,

Displaying Webcam Preview in a Metro App Using WinRT and XAML

Note: the WinRT XAML Toolkit library that I share here has a CameraCaptureControl that makes it simple to host the camera preview, take pictures or record videos.
Note: This article is based on Windows 8 Developer Preview version and it should still be relevant with Windows 8 RTM, but please let me know if that is not the case.

I was looking at the controls available in WinRT () and I’ve stumbled upon this control called – CaptureElement. What it does is it “Represents a media capture from a capture device, for example recorded video content.” I thought I’d give it a go and see if I can display the output from the webcam on screen – which could be useful for AR (Augmented Reality) applications or even just for fun. This is how you do a preview then…

Continue reading

Tagged , ,