c# - Prevent Multi-select in WPF Tab Control? -
It appears that in a WPF TabControl
, the user can select multiple items, either < Kbd> Ctrl-click or Shift-Click .
Is there any property that controls it? Or do I have to organize the clicks / events and clear the other items unselected?
Thanks for Moore's comment, I was able to solve it.
TabControl.Items in each TabItem
needs a control to display the contents. My program is using a ListView
:
tabItem.Content = new System.Windows.Controls.ListView ();
When creating each ListView
, set SelectionMode
property to single
. (Why this is not happening, if is the default one, then the secret is ...)
Comments
Post a Comment