Nico's digital footprint

I grew up in the nineties, that makes me awesome by default

Windows App day Belgium 23/11

by Nico

That Microsoft loves his communities is no secret. The past months we literally drowned in hackathons, trainings, competitions and many more Windows 8 related. And it doesn’t look like it’s stopping any time soon! On November 23th Microsoft Belgium organizes the Windows App Day, a day stuffed to the top with sessions divided into two tracks, one for developers and one for designers. And the best part? It’s not only for Windows 8! Windows Azure and my all time favorite platform, Windows Phone 8 will be represented as well.

So if you’re in or around Belgium on November 23th and feel like spending the day with our great community feel free to drop by. There might even be some very cool announcement concerning people that are into Windows 8 development… drop by to get the full story (and start thinking about that one killer app)!

Details:

When: Friday 23 November 2012, 9AM to 6PM

Where: ALM Meeting Point

Filip Williotstraat 9

2600 Antwerp (Berchem)

All details: http://www.microsoft.com/belux/msdn/windows-app-day/default.aspx

header_app-day


Tags:

.Net | Community | Metro | WP7 | WP8 | WinRT | Windows 8 | XAML | Windows programming

Lunch development

by Nico

For the last couple of weeks I’ve been developing a game during my lunch break at work. Why? Mainly because I had this project in my mind for a while and I wanted something fun to do while eating lunch. Since I’ve started working on it I made a habit of tweeting my progress after the break, around 1PM GMT+1. Since I’ve started doing so a lot of people have shown interest in the project, providing tips and some even wanted to see the source code or wanted to help on the project.

I never expected to get this much feedback from something like this so I’ve decided to try and write weekly blog posts about the project, I will still tweet daily about the progress and then make a weekly summary post with findings, problems and fixes.

Now, about the game. The game is a stealth, sneak around the level, isometric 2D XNA game build for Windows Phone 7.5. If I finish it and I’m happy enough with the result to submit it to the marketplace then I’ll port it to Monogame and release it on some other platforms (no, not you iOS).

What I have so far: I have a map, created with a free, open source program called Tiled. I use Tiled because it’s pretty easy to use and it provides libraries for Windows Phone to read the maps in an XNA project. Next to the map I have a player that can run around on the map, the player always stays in the center of the screen so I basically move the map around. I have an enemy, with a triangular field of view, who moves up and down between two points. The player gets spotted when he enters the field of view of the enemy.

What I’m working on now: I’m currently building a level editor with winforms. This will make it easier for me to create lots of levels with enemies and objects in them. I currently have the form, I can open a map and read out the size date from the .tmx file (.tmx get’s created with Tiled). I want to finish the editor now so I can complete a first level. Once I have a complete level I can finetune the gameplay.

Will I open source this? Currently not, there are a few people that I know personally who have access to the source code but the repository will remain private for now. Why? because I’m thinking about making this my first paid app (with a free, ad containing version) on the WP7 marketplace. If I get completely stuck I might get some other developers involved, but for the time being I will remain the only developer.

Can I give more information about the story or setting? I probably could Glimlach but I won’t for now, I’m going to build up the hype meter for this project so that everyone will want to get it and I will get rich. Once I’m rich I can start up my own game developer studio, create Version 2 of this, get even richer, buy EA and finally get them to make decent games again. Then I’ll probably wake up and realize this was all a dream.

Should you be interested in following my project, please follow me on Twitter (@NicoVermeir) for daily updates or stay tuned for weekly updates on my blog.

PS: I’m going on holiday from June 12th until August 1st so there will probably be little to no updates in that timeframe.


Tags:

.Net | WP7 | WP8 | Windows programming | XNA | Game development

Windows 8–the road so far

by Nico

So it’s official, the Windows 8 beta, nicknamed Consumer Preview, will hit the worldwide web on February 29th. Time to list what we know so far.

For consumers:

  • the classic start menu has been replaced by a Metro interface, still unsure if there will be an option to bring back the classic menu
  • the windows desktop has now been extracted from the kernel and is just an app
  • Windows 8 utilizes much less resources then Windows 7, allowing it to run smoothly on weaker hardware
  • boot time is impressive, it takes mere seconds to launch. The cause is the fact that Windows 8 doesn’t shutdown completely, it’s kernel goes into hibernation. When you do a hard reset of the device you’ll notice that booting takes more time but it’s still noticeably faster than Win 7
  • Windows 8 will have two types of applications, the classic ones like we know them on Win 7 and Metro style applications. These Metro apps run completely full screen, no chrome like titlebars or borders
  • Metro apps run either full screen or snapped, running side by side with another app (even desktop apps)
  • Windows 8 comes with it’s very own Marketplace. Here you can download all kinds of Metro style applications
  • the ribbon that has been in Office since version 2007 now makes it’s way into the Windows explorer but it will be collapsed by default
  • Pinball and solitaire are installed games by default. Available in the store at launch will be:
    • Hydro Thunder
    • Toy Soldiers
    • Reckless Racing
    • Angry Birds
    • Ilomilo
    • Rocket Riot
    • Full House Poker
    • Tentacles
    • Crash Course
    • Ms Splosion Man
    • Wordament
  • Following apps will be included in the Consumer Preview
    • Camera
    • Messaging
    • Mail
    • Calendar
    • SkyDrive
    • People
    • Photos
    • Video
    • Music
  • Win 8 will be available on x86/x64 cpu’s and for the first time on ARM, mostly used in tablets
  • ARM versions of Windows will have both desktop and metro interface and comes with Office 15, a new Office version
  • Your profile (settings, wallpaper, …) will be synched to skydrive so that every time you buy a new Win 8 pc you don’t need to set everything manually
  • Refresh and Reset options, a refresh will keep all files and folders but will put Windows back in a fresh installed state, removing all installed applications and settings while a reset will do the same but also deletes all files and folders for all profiles
  • native USB 3.0 support
  • Windows 8 can mount and browse ISO and VHD files
  • UEFI Safe boot to prevent boot sector virusses
  • full backwards compatibility

For Developers:

  • anyone with XAML experience will be able to build Metro apps
  • Metro style takes a lot of the concepts of Windows Phone 7 and Silverlight
  • Instead of using the dreadful Win32 API developers can now use WinRT which provides a much cleaner way to interact with the OS
  • Metro apps are NOT .net code
  • .net 4.5 is included in Win 8
  • Metro apps in C#/VB/C++ + XAML or Javascript + HTML

 

Windows 8 will be pretty different compared to win 7. The developer preview has been out since September and I’ve been using it on a Iconia Tab W500 tablet since December. At the time I started using it I also had an iPad 2 but there’s just something special about a full blown OS on a tablet device, especially when running Win 8. I like the OS so far. The developer preview has lots of bugs, obviously, so I’m very curious about the performance and stability of the Consumer preview. Due to the stability problems I haven’t spend much time developing metro apps, this will change with the consumer preview. I’ll probably start by converting my WP7 apps to Win 8. More about that when I get to it.


Tags:

.Net | Windows programming | Windows 8 | Metro

Techdays Belgium 2012

by Nico

So Techdays is right around the corner and I’ll be attending for the third time.I’ll be attending all kinds of sessions going from Windows 8 development to the complete deep dive track on web to my favorite subject, Windows Phone 7 development. I’m also excited about the Scott “The Gu” Guthrie doing the opening keynote and doing a session the second day. Also presenting this year is Laurent Bugnion, the father of the awesome MVVM Light framework.

Here’s the list of sessions I’ll be attending, this list is subject to change depending on if I change my mind the last minute, as I’m known to do sometimes Glimlach.

Tuesday February 14th

  • Opening keynote with Scott Guthrie
  • Welcome to the Metro Application Platform
  • Windows Phone Fast App Switching, Tombstoning and Multitasking
  • The Future of C# and Visual Basic
  • Devices + Cloud: Using Azure on iOS, Android, Windows Phone, …

Wednesday February 15th

  • ScottGu unplugged
  • Take a ride on the Metro
  • The zen of async: Best practices for best performance
  • MVVM Applied: From Silverlight to Windows Phone to Windows 8
  • MVVM & WCF RIA Services: an architectural story
  • Building a data intensive application

Thursday February 16th

This is a deep dive day, I’ll be following the web track that focuses on what’s new in ASP.net 4.5 and Visual Studio 11

 


Tags:

.Net | Presenting | WP7 | Windows programming | XAML | XNA | Web development | MVVM Light | Devices

Comic Organizer part II: Going metro

by Nico

In part 1 I talked about MVVM and MVVM Light, I hope you learned something from it. Now it’s time to move on to the next part, we’re going to start building a WPF application.

First things first, here are the tools I’m going to use:

The WPF toolkit is a set of controls that extend the default WPF controls, it’s build by Microsoft and updated a few times a year.

If the MVVM Light toolkit is installed you should see new project types when creating a new project in Visual Studio. I’m going to create a new WPF 4 project.

Now that the project is created, take a look at the solution explorer, there you will find the MVVM parts nicely ordered in separate folders. If you want you can take them and put every part in a separate project, I won’t be doing that for my application since it’s pretty small.

 

Now that we got our project, let’s metronize it. For this we need to open the solution in Expression Blend. The best way to work on XAML based projects is to open the solution in both Visual Studio and Expression Blend, changes made in one will automatically be reflected in the other.

Metro isn’t a style that is out of the box available for WPF. While searching for a way to imitate the Metro windows like Microsoft uses it in Zune I stumbled upon the blog of Steven Hook. He had the idea of using the Wingdings font for the upper right buttons. Sounds weird? Let me show you how it works.

In Expression Blend I’ve set the WindowsStyle property to “None” and ResizeMode to “ResizeWithGrip”, the generated XAML looks like this

Code Snippet
  1. <Window x:Class="ComicOrganizer.MainWindow"
  2.         xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3.         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4.         xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  5.         xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6.         mc:Ignorable="d"
  7.         Title="Comic Organizer"
  8.         DataContext="{Binding Main, Source={StaticResource Locator}}" WindowStyle="None" ResizeMode="CanResizeWithGrip" AllowsTransparency="True">

This gives a clean white window without borders that can be resized by using the grip in the lower right corner. Next step is adding the controls for closing, maximizing and minimizing the window. This is the XAML responsible for those buttons

Code Snippet
  1. <Grid
  2.     x:Name="HeaderGrid"
  3.     Height="50"
  4.     VerticalAlignment="Top" Grid.ColumnSpan="2">
  5.     <Grid
  6.         x:Name="DragableArea"
  7.         Background="White"
  8.         MouseDown="DragableGridMouseDown"/>
  9.     <StackPanel
  10.         Orientation="Horizontal"
  11.         Margin="0,5,5,0"
  12.         HorizontalAlignment="Right"
  13.         VerticalAlignment="Top"
  14.         Background="White">
  15.         <TextBlock
  16.             x:Name="ChangeViewButton"
  17.             Text="2"
  18.             FontFamily="Webdings"
  19.             Foreground="Gray"
  20.             Margin="0"
  21.             VerticalAlignment="Top"
  22.             HorizontalAlignment="Right"
  23.             MouseLeftButtonUp="ChangeViewButtonMouseLeftButtonUp" />
  24.         <TextBlock
  25.             x:Name="MinimizeButton"
  26.             Text="0"
  27.             FontFamily="Webdings"
  28.             Foreground="Gray"
  29.             Margin="5,0,0,0"
  30.             HorizontalAlignment="Right"
  31.             VerticalAlignment="Top"
  32.             MouseLeftButtonUp="MinimizeButtonMouseLeftButtonUp" />
  33.         <TextBlock
  34.             x:Name="MaximizeButton"
  35.             Text="1"
  36.             FontFamily="Webdings"
  37.             Foreground="Gray"
  38.             Margin="5,0,0,0"
  39.             HorizontalAlignment="Right"
  40.             VerticalAlignment="Top"
  41.             MouseLeftButtonUp="MaximizeButtonMouseLeftButtonUp" />
  42.         <TextBlock
  43.             x:Name="CloseButton"
  44.             Text="r"
  45.             FontFamily="Webdings"
  46.             Foreground="Gray"
  47.             Margin="5,0,0,0"
  48.             HorizontalAlignment="Right"
  49.             VerticalAlignment="Top"
  50.             MouseLeftButtonUp="CloseButtonMouseLeftButtonUp" />
  51.     </StackPanel>
  52. </Grid>

The “DragableArea” grid will allow the application to be dragged around the screen by the user, just like any app does. The Stackpanel takes care of the 4 buttons in the upper right corner.

Now we need to implement the logic for these buttons, the buttons are actually textblocks but will behave like buttons. The blog that I got this idea from said that the logic of the buttons is the responsibility of the view, so even in an MVVM application it could be placed in the code behind file of the view. I tend to agree with this logic so I’m going to place it in the code behind as well, although it’s perfectly possible to put it in the ViewModel.

The complete code behind file looks like this:

Code Snippet
  1. using System.Windows;
  2. using System.Windows.Input;
  3. using ComicOrganizer.ViewModel;
  4.  
  5. namespace ComicOrganizer
  6. {
  7.     /// <summary>
  8.     /// Interaction logic for MainWindow.xaml
  9.     /// </summary>
  10.     public partial class MainWindow : Window
  11.     {
  12.         /// <summary>
  13.         /// Initializes a new instance of the MainWindow class.
  14.         /// Metro style logic is done here because it's the responsibility of the View
  15.         /// idea found on http://stevenhook.blogspot.com/2011/01/wpf-borderless-window-controls.html
  16.         /// </summary>
  17.         public MainWindow()
  18.         {
  19.             InitializeComponent();
  20.             Closing += (s, e) => ViewModelLocator.Cleanup();
  21.         }
  22.  
  23.         private void CloseButtonMouseLeftButtonUp(object sender, MouseButtonEventArgs e)
  24.         {
  25.             Close();
  26.         }
  27.  
  28.         private void MaximizeButtonMouseLeftButtonUp(object sender, MouseButtonEventArgs e)
  29.         {
  30.             WindowState = WindowState.Maximized;
  31.         }
  32.  
  33.         private void ChangeViewButtonMouseLeftButtonUp(object sender, MouseButtonEventArgs e)
  34.         {
  35.             WindowState = WindowState.Normal;
  36.         }
  37.  
  38.         private void MinimizeButtonMouseLeftButtonUp(object sender, MouseButtonEventArgs e)
  39.         {
  40.             WindowState = WindowState.Minimized;
  41.         }
  42.  
  43.         private void DragableGridMouseDown(object sender, MouseButtonEventArgs e)
  44.         {
  45.             if (e.ChangedButton == MouseButton.Left)
  46.                 DragMove();
  47.         }
  48.     }
  49. }

 

These little methods speak for themselves, if you have any questions about them feel free to leave a comment or contact me via mail, twitter, …

That was it for this second part, we now have a running WPF application in Metro style using some easy tricks. I believe that Microsoft will give a real Metro style out to the community, when they do I’ll probably convert this app to use the real style.

In part III we’ll start receiving data and maybe some databinding as well, who knows? Glimlach

Stay tuned for part III in a couple of weeks!


Tags:

.Net | Windows programming

Comic Organizer Part I: MVVM Light

by Nico

All right, let’s grab a beer and get this show on the road shall we?

First topic I want to discuss is MVVM, Model-View-ViewModel. A big mistake people tend to make is to call MVVM a framework, in reality MVVM is a design pattern, a best practice guide to build a structured loosely coupled application. MVVM works great in WPF, Silverlight and Windows Phone 7 development. Windows 8 Metro apps will also be great to use MVVM in.

So let’s walk through the different parts of the pattern, I know there are thousands of articles about this subject on the net but bear with me, things will get interesting.

Let’s start off with a small diagram

All right, keep this in mind and let’s start discussing the different parts.

The View

First subject is the view, the view in our WPF application will consist out of XAML files, these files describe the user interface and all the controls on them. This includes buttons, checkboxes, radiobuttons, listboxes, etc. The only thing that the view is aware off is what viewmodel it is binded too and what controls are bound to what property on the viewmodel. There is no business logic in the view and although there is a code-behind file, the rule is to keep it as clean as possible. The viewmodel and control bindings happen in the XAML code, each XAML control has a property that can be bound to a viewmodel property. An example of binding a button:

Code Snippet
  1. <Button x:Name="SearchButton" Content="Search" Margin="0,50,0,0" Command="{Binding SearchCommand, Mode=OneWay}"/>

When the button is clicked the Binding command goes searching in the viewmodel for a command called SearchCommand and executes it.

The ViewModel

The viewmodel contains all the data that needs to be shown on the view. These data are contained in properties that are bound to the controls on the view. Apart from data that is shown on the view, the viewmodel can also contain a bunch of commands that can be bound to events, most often used for a button click. The advantage of seperating form and form logic is that it’s very easy to bind a new view to an existing viewmodel, it’s just a matter of adding controls on the form and binding them to the right properties. The command used in the example of the view is defined like this:

Code Snippet
  1. public RelayCommand SearchCommand { get; private set; }

RelayCommand is a class from MVVM Light that implements the System.Windows.Input.ICommand interface.

The ICommand interface is what you need to implement if you’re not using an MVVM implementation by a third party. The interface looks like this:

Code Snippet
  1. public interface ICommand
  2.     {
  3.         bool CanExecute(object parameter);
  4.         void Execute(object parameter);
  5.         event EventHandler CanExecuteChanged;
  6.     }

The relaycommand now needs to know what method to execute when it’s called. This is usually done in an InitiateCommands method like this:

Code Snippet
  1. private void InstantiateCommands()
  2.         {
  3.             SearchCommand = new RelayCommand(LoadList);
  4.         }

This will call a method called LoadList when the button is clicked. You can, off course, use anonymous methods like this:

Code Snippet
  1. private void InstantiateCommands()
  2. {
  3.     SearchCommand = new RelayCommand(()=>
  4.                                             {
  5.                                                 //...
  6.                                             });
  7. }

for those not familiar with anonymous methods, when the button is clicked all instructions between the brackets are executed. I’ll show more examples of databinding as I get further into this serie.

The Model

The model is often a separate object and contains the business logic. Classes that process the information that the viewmodel uses to pass to the view or that is passed to the viewmodel from the view.

MVVM Light

So what is this MVVM Light thing all about? MVVM Light is an open-source MVVM implementation created by Laurent Bugnion and can be downloaded from Codeplex. MVVM Light can be installed from Codeplex or from NuGet. When you install it from Codeplex you get new project types for WP7, WPF and SilverLight. Laurent recently added a preview version for Windows 8 Metro apps. Now what sets MVVM Light apart from its competitors? For me personally, the ease of use. MVVM Light just makes sense, it’s easy to use, Laurent has some nice documentation and some videos from events where he talked about his toolkit. The toolkit also contains a great messaging system that allows an application to send messages between all classes and projects within an application, a great tool that helps you create nice loosely coupled applications. Recently a very basic IoC container was added to the toolkit, which really shows the dedication and hard work that Laurent puts in his product. The container allows the viewmodels to accept instances from classes without tight coupling them, more about that when we get to it in future posts.

I really hope this first post made some sense, it’s the first time that I’m writing a series of blogposts while learing about the subject myself. If I made any errors or you’ve got some questions, feel free to drop me a message on Twitter, mail or leave a comment.

See you soon in Part 2!


Tags:

.Net | WPF | Windows programming

Starting new blogseries

by Nico

My comic application for Windows Phone 7, called ComicDB, has been published for a good month now and as I’m working on version 2 I got an idea to build a Windows desktop application. The application will allow users to maintain a library of comic series and to keep track of owned and read issues, something I’m struggling with myself. I decided to make a blogseries about my progress, I started working on it today so I’ll try to get the first post online in a few days.

Some details:

  • WPF application
  • Metro style
  • MVVM Light
  • trying to use the SOLID principles

I’m currently learning SOLID principles and design patterns, so some refactoring might occur but I think it’ll be fun for you to follow my learning progress and it’ll be fun for me to build now and to look back to in a few years


Tags:

.Net | WPF | Windows programming

MS certification

by Nico

Tags:

.Net | Windows programming

Techdays Belgium 2011

by Nico

The Belgian Microsoft Techdays 2011 will take place 26-27-28 April at Metropolis Antwerp.

I'll be attending, hope it will be as good as last year.
Things I look forward to:

  • Silverlight 5
  • C# 5 (asynchrony in particular)
  • HTML5 and CSS3
  • Windows Phone 7 development
  • Hopefully some XNA session

Info on the techdays can be found here


Tags:

.Net | Web development | HTML | Silverlight | Windows programming

  Log in

About the author

Hi,

My name is Nico, I’m an MCP living in Belgium.
I’m currently employed as a consultant in the Mobile Solution Center at RealDolmen, one of Belgium’s leading IT single source providers, where I focus on Windows Phone and Windows 8 development.

I'm also founding member and board member of the Belgian Metro App Developer Network, a user group focussed on Windows 8 and Windows Phone development. If you're in Belgium feel free to drop by if we're doing an event. http://www.madn.be

Since June 2012 I'm a proud member of Microsoft's Extended Experts Team Belgium. And in February 2013 I became a member of DZone's Most Valuable Bloggers family.

This blog will be about Windows Phone 7, C#, XNA , WPF, Silverlight, and much more!

I hope to get feedback from my readers either through comments, mail (nico_vermeir@hotmail.com), twitter, facebook, …

 

 

MeetLogo

 

MVBLogo

mybook

 

mybook

 

Month List