One way of looking at type safety is that it adds automatic tests all over your code that stop some things breaking in some ways. One of the tools that helps this in .NET is generics.However, both WinForms and WPF are generics-free. There is no ListBox<T> control, for example, which could only show items of the specified type. Such controls invariably operate on object instead.Why are generics and not popular with UI framework developers?
Why dont UI frameworks use generics?
.net;wpf;generics
WinForms came with .NET 1.0 before there was support for generics. In the case of WPF, development started on that before the Framework supported generics as well. Although generics support came to .NET before WPF was released, it would have taken substantial effort to go back and add it in.Also, the XAML to represent generics is not pretty