programming

Microsoft icons for developers

Apparently, Microsoft allows users of Visual Studio to include some icons, supplied with the product. For example, to look at available icons in Visual Studio 2010, locate the file VS2010ImageLibrary.zip in the installation directory of your copy of VS (i.e. C:\Program Files\Microsoft Visual Studio 10.0\Common7\VS2010ImageLibrary\1033) and extract the .png files you need. You can extract the necessary sub-images from them.

Topic: 

Windows Phone .NET localization that works

I was quite eager to learn about Windows Phone 7 when the development preview came out. I downloaded the tools and tried to build a sample to get a feel. I must admit that developing .NET application for the new OS is quite easy. However one bit I couldn't make work - localization. With today's global markets and multi-language consumers it is important to be able to deliver your product in different languages. I suspect there was a bug in the version of software I was dealing with then.

Windows Phone 7 development in Visual Studio 2010

The recently released Microsoft Visual Studio 2010 does not support mobile development for OS versions prior to the new Windows Phone 7. If you want to write software for Windows Mobile 6.5 or lower, you need to stick to Visual Studio 2005. So much for backward compatibility.

WPF DataGrid row validation

WPF is a very powerful framework for GUI development. Among other things, it contains a unified approach to user input validation. Adding validation in WPF is very straightforward in most cases. However, validating DataGrid rows is slightly challenging. However, the good people of the world has already taken care of the problem and provided quite detailed walk-throughs. I recommend reading this interesting article (WPF DataGrid Practical Examples) about WPF DataGrid.

Topic: 

How to invoke click event in WPF programmatically

WPF is still relatively new and many developers are only scratching the surface of its abilities. Coming from a different framework, one must learn anew how to do the familiar tasks. Sometimes you need to to trigger a click or some other event for one of your WPF controls, such as a button, a menu or a checkbox, directly from code. There are no methods on the controls to invoke these events explicitly.

Topic: 

Events and BinaryFormatter serialization in .NET

Serialization in .NET world is not straightforward. For years we've been told to use XmlSerializer, but it has its limitations. It is unable to serialize anything but the public properties/fields, it cannot deal with interfaces in most of the circumstances (specific collection interfaces being the only notable exception) etc.

Topic: 

Code generation in Visual Studio

I have never suspected that Microsoft had this built-in, but it appears to be the case. Code generator called T4, which targets both C# or VB.NET, is built into your copy of Visual Studio and is available as you read this article. Basically, all you need is to add a new file to your solution with the extension .tt, and that's it, besides from actually writing the code for the template.