Hi,
today i updated a project from 10.2.20102.2174 to 2207.
At startup (before the window opens) this software dynamically creates several views. Each view add's an entry to the XamOutlookBar. When the startup screen is added, the SelecetedGroup property of the XamOutlookBar is programmatically set to the group of the screen.
Before the update the XamOutlookBar comes up with the SelectedGroup opened and the entry for the startup screen selected.But after the update there is no group selected when the window is shown. So it seems that setting SelectedGroup is not possible until the window is shown. After the window is shown SelectedGroup work's like before.
Is there a workaround to set the SelectedGroup before the XamOutlookBar is shown?
Thanks,
Bastian
Did you try setting the IsSelected property for the group which you would like to become selected initially?
Still, if the behavior changed between SRs this could be classified as bug / regression.
HTH,
Setting the IsSelected property didn't change anything.
But I could narrow down the issue:My XamOutlookBar.GroupsSource is bound to an ObservableCollection with items which represent my groups and their entries.If I set SelectedGroup after all items where added to the ObservableCollection it works like expected.But before the SR adding Items to the ObservableCollection didn't affect the SelectedGroup.
Hope this helps finding the bug.
HI DiCOM2010,
Can you provide a small sample application that replicates this issue and post it to this thread?
Sincerely, Matt Developer Support Engineer,
HI Bastian,
Thanks for the sample. I will bring this to the attention of the Developers. Sincerely, Matt Developer Support Engineer
Hi Matt,
I've attached a small sample application with the main parts of my implementation.
As I mentioned, when I try to select the last added group all works fine.But if I select a group and add another group, the default group is selected.You can see this behaviour, when you switch the lines in AddItems() in MainWindow.xaml.cs.
Sincerely,Bastian