Hello.

I am Paul Kinlan.

A Developer Advocate for Chrome and the Open Web at Google.

I love the web. The web should allow anyone to access any experience that they need without the need for native install or content walled garden.

Solution to my "Problem with List and TypeConverter" Problem

Paul Kinlan

I had a problem getting TypeConverters to work with generic lists in XNA and WinForms. The designer wouldn't generate the code I wanted for properties. I needed a simple way to serialize objects, so I tried a minimalist approach. Overriding CanConvertTo and ConvertTo methods in my TypeConverter was enough for the designer to serialize the objects correctly, generating much cleaner and simpler code.

Read More

Assigining a TypeConverter to a class you don't own

Paul Kinlan

In this post, I describe a solution to a problem I encountered while working with XNA Beta1 and Vector2 structs. Because Vector2 didn't have an associated TypeConverter, the designer lacked support. Applying a TypeConverter to the property worked in the designer, but Visual Studio 2005 ignored it during serialization, resorting to resource files, which was messy. My workaround involves dynamically adding a TypeConverter to the Vector2 type itself using TypeDescriptor.AddAttributes, which is invoked during the class's construction. By registering the Vector2Converter with the Vector2 type early on, both the designer and code serialization work harmoniously.

Read More