Converting from form app to WPF