Some Short Videos I Made

May 26, 2011

I’ve created a few short videos, covering some introductory material – still may be useful for some… The audio quality is not the best possible, but should be fairly understandable. All the videos are in Hebrew (sorry, non-Hebrew speakers! You can still watch me type code samples, it may have some value) The videos are: Introduction to C# 5.0 asynchronous programming Introduction to the Managed Extensibility Framework (MEF) Understanding XAML (Part 1) Understanding XAML (Part 2)   They are also available (or will be shortly) on the Hi-Tech TV web site....

WPF Hidden Gem: UniformGrid

May 12, 2011

The famous WPF/Silverlight Grid class is the typical workhorse of a complex UI. Able to imitate any of the other standard container panels (except WarpPanel, which is too weird even for a Grid…), its elements are placed in specific cells using the Grid.Row and Grid.Column attached properties (with optional spanning available through Grid.ColumnSpan and Grid.RowSpan). There is a less known cousin to the Grid – the UniformGrid (does not exist in Silverlight out of the box), that does not seem to be too useful at first glance. Curiously enough, it does not derive from Grid, but rather directly...
tags: , , , ,

Tip: Using a Console in a GUI Application

May 11, 2011

When working with a WinForms or a WPF application in .NET, a console application is not created by default, so statements involving the Console class normally go to the trash. The console window may be a useful debugging aid, printing anything that may be important during runtime. Fortunately, there is a way to get it back. Actually, there are two ways. The first, the “hard way” is to create the console explicitly using the native AllocConsole function: private static extern void AllocConsole(); All that’s left is to call this function in Main, or the Application class’ constructor. The other way (the easy way)...