Category Archives: Windows Forms

Presenting FilterList

Earlier today i decided to add ‘Filtering’ to my SortableBindingList. This resulted in writing a FilterList class. This class can be easily used as following: void textBoxFilter_KeyUp(object sender, KeyEventArgs e) { var filterChars = this.textBoxFilter.Text.ToLower(); this.Filter(filterChars); } void Filter(string filterChars) … Continue reading

Posted in C#, Windows Forms | Leave a comment

Presenting ControlStateMachine

Here is a situation we are all familiar with: A form that only displays a certain set of controls depending on the mode or state of the application. Let me start with an example: At design time there are three … Continue reading

Posted in C#, Windows Forms | Leave a comment

Presenting ControlChanges

Because i noticed that i kept writing the same operations on control over and over again i decided to capture them in a couple of functions. I presume most of you have done this already. Here is the list of … Continue reading

Posted in C#, Windows Forms | Leave a comment

Experimenting with ControlStateMachine and Fluent interfaces

A long time ago i read Build your own CAB series and recently i noticed that there is a wiki: Presentation Patterns Wiki! and it inspired me to experiment with state machines. Here are a couple of examples: controlStateMachine = … Continue reading

Posted in C#, Patterns, Windows Forms | 1 Comment

Presenting AssemblyTypePicker

I really like the way the Object Browser makes the types in an assembly visible. Because i have a couple of programs that require a given type as input, i have decided to add a TypeTree control to BeTimvwFramework that … Continue reading

Posted in C#, Windows Forms | Leave a comment

Display WorkItems in a WinForms application

Using the Microsoft.TeamFoundation.WorkItemTracking.Controls assembly it is possibe to display WorkItems. Here is a little demo application that will display all the WorkItems that have been changed by one of the given users in the given range: Feel free to download … Continue reading

Posted in C#, Windows Forms | Leave a comment

How the name of an embedded resource is generated in a C# project

A while ago i was wondering how the name of an embedded resource is generated in a C# project. Earlier today i was looking in Microsoft.CSharp.targets and found the answer: The CreateManifestResourceNames target create the manifest resource names from the … Continue reading

Posted in C#, Windows Forms | Leave a comment

Using DateTimePicker and Custom Format

Today we ran into a nasty problem with DateTimePickerFormat.Custom. We allow the user to input a month/date with a DateTimePicker as following (nothing fancy): private void Form1_Load(object sender, EventArgs e) { this.dateTimePicker1.Value = new DateTime(2007, 8, 31); this.dateTimePicker1.Format = DateTimePickerFormat.Custom; … Continue reading

Posted in C#, Windows Forms | 3 Comments

Bending the code generation of IExtenderProvider to your will

In Exploring CodeDomSerializer i already explained how we can modify the code that the Visual Studio designer generates for us. With a typical IExtenderProvider the designer generates an initializer, SetXXX methods and a variable declaration, which looks like: this.constantsExtenderProvider1 = … Continue reading

Posted in C#, Visual Studio, Windows Forms | Leave a comment

Debugging custom UITypeEditors

If you read this you’re probably gonna think: What a moron! Anyway, i’m sharing this in the hope that i’ll be the last to undergo the following. In order to test my custom UITypeEditor i did the following: Create a … Continue reading

Posted in C#, Visual Studio, Windows Forms | 2 Comments