C# Windows 8 Tutorial 1: Calculator 1

Video is ready, Click Here to View ×

This series will be on Windows 8 and Windows RT programming using C# and XAML with the new Visual Studio 2012. We will program whole projects from scratch for Microsoft Desktop PCs and tablets like the new Surface.

This is the first of a new style of tutorial for me, I’ll be recording my every step and developing whole (though initially quite simple) applications for the Windows store. We’ll be making things that run on Desktop PC’s as well as the new Microsoft Surface tablets and similar…


  1. thank's but i have small problm i get this notification when i try to calculate an operation::
    Une exception de type 'System.FormatException' s'est produite dans mscorlib.dll mais n'a pas été gérée dans le code utilisateur

    Informations supplémentaires : Input string was not in a correct format.

    S'il existe un gestionnaire pour cette exception, le programme peut continuer en toute sécurité.

  2. I'd attach the handler manually in the CS file. AFAIK XAML is only able to call handlers from the class it belongs.

    If there's a XAML/CS class called MP with a button, BTN, and there's another class called OC, with the event handler BTNClicked.

    I'd attach the event handler in the MP constructor
    BTN.Click += new RoutedEventHandler(OC.BTNClicked);

    Assuming the handler is static. If it's an instance method, you'd need:
    BTN.Click += new RoutedEventHandler(MyInstance .BTNClicked);

    Great question!

Leave a Reply

Your email address will not be published.