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