Convert to WPF 4