I am building an MDI application, in which i want to add tabs specific to the active mdi window to the ribbonbar.
I got this working by capturing the window's activated event. When a window is activated it removes the tabs associated with the previous active window, and adds new tabs which are associated with the new window. After the new tab(s) are added I activate one by using the tab.IsSelected property.
This works, however for some reason the title of the tab isn't highlighted if i switch between MDI windows.
For example, I open a window which lists orders for example. The associated tab gets added, selected, and is properly highlighted. If I then click on an order, it opens a detail window. The detail window gets activated, so the tab associated with the "order list" window gets removed, and a new tab gets added. Again, the tab is properly added, selected and highlighted. If i now select the "order list" window again, the "order detail" tab gets removed, the "order list" tab is added, and gets selected. However, for some reason it doesn't highlight the tab title.
Any ideas what might be causing this peculiar behaviour? As far as i know i'm not capturing "lost focus" events which might cause problems.
I got this working by capturing the window's activated event. When a window is activated it removes the tabs associated with the previous active window, and adds new tabs which are associated with the new window. After the new tab(s) are added I activate one by using the tab.IsSelected property.
This works, however for some reason the title of the tab isn't highlighted if i switch between MDI windows.
For example, I open a window which lists orders for example. The associated tab gets added, selected, and is properly highlighted. If I then click on an order, it opens a detail window. The detail window gets activated, so the tab associated with the "order list" window gets removed, and a new tab gets added. Again, the tab is properly added, selected and highlighted. If i now select the "order list" window again, the "order detail" tab gets removed, the "order list" tab is added, and gets selected. However, for some reason it doesn't highlight the tab title.
Any ideas what might be causing this peculiar behaviour? As far as i know i'm not capturing "lost focus" events which might cause problems.