79096585

Date: 2024-10-17 05:35:32
Score: 1
Natty:
Report link

I found a solution, maybe someone will need it: it turns out that there is a FilteredWorksetCollector that does an excellent job with this task.

var worksets = new FilteredWorksetCollector(_doc)
        .OfKind(WorksetKind.UserWorkset)
        .ToWorksets();

newChangeWorkSetComboBox.Items.Clear();

foreach (Workset workset in worksets)
{
    newChangeWorkSetComboBox.Items.Add(workset.Name);
}
StackPanel_ChangeWorkSets.Children.Add(newChangeWorkSetComboBox);
Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: zavla