public static bool Edit(Window parent, VideoRole role) { var window = new RoleEditorWindow() { Owner = parent }; window.ViewModel.ReadFromObject(role); if (window.ShowDialog() == true) { window.ViewModel.WriteToObject(role); return true; } return false; }