The WPF TabControl with its default TabPanel arranges tab items into multiple rows when the horizontal size is too small. Then the tab selection changes the order of these rows, so the selected tab item is always in the first row.
I found several articles on how to replace TabPanel with another items control so instead of the multiline behavior they get scrolling tabs.
I would like to keep the multiple rows (no scrolling), but disable the rearrangement of rows. Once the tabs are created, they should stay in position, no matter how the selection changes. Is this possible?
The only solution I found was modifying the framework’s TabPanel class so that its
int GetActiveRow(int[] solution)method always returns 0. Although this solves the problem, I’m not sure it is legal to use the framework’s source in this way.