Working on WPF conversion