private void AddPropertyGroup(object sender, RoutedEventArgs e) { AddPropertyGroupDialog dialog = new AddPropertyGroupDialog(); bool?result = dialog.ShowDialog(); if (result.HasValue) { if (result.Value) { m_Project.AddPropertyGroup(dialog.Condition); } } }