October 2008 Entries

Databinding an Enum in WPF...

The situation I have is this - I have a class defined as such: public class MyClass { public int TheInt { get; set; } public string TheString { get; set; } public MyEnum TheEnum { get; set; } } with 'MyEnum' defined as: public enum MyEnum { A, B, C, D } I have a Window that displays the data in such a way: <Window.Resources> <CollectionViewSource x:Key="SortedEnumView"> <CollectionViewSource.So... <ComponentModel:SortDesc... </CollectionViewSource.S... ......