private void EditCustomActivityButton_Click(object sender, RoutedEventArgs e)
        {
            var  window    = new CustomActivity(this.settings.DisplaySettings.CustomPayloadData, this.CustomActivityCollectionCombo.SelectedIndex);
            bool?succeeded = window.ShowDialog();

            this.SelectOrDefault(succeeded, window);
        }
        private void SelectOrDefault(bool?dialogResult, CustomActivity dialog)
        {
            if (dialogResult.Value)
            {
                var activityTag = dialog.CustomActivityTag;
                if (!string.IsNullOrWhiteSpace(activityTag))
                {
                    var activityInfoEntry = this.settings.DisplaySettings.CustomPayloadData.FirstOrDefault(
                        (item) => item.Name.Equals(activityTag, StringComparison.OrdinalIgnoreCase));

                    this.CustomActivityCollectionCombo.SelectedItem = activityInfoEntry;
                }
            }
        }