Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
似乎在 WPFTabControl中,用户可以通过Ctrl-Click或选择多个项目Shift-Click。
TabControl
有没有控制这个的属性?还是我必须处理单击/选择事件并明确取消选择其他项目?
感谢摩尔的评论,我能够解决这个问题。
集合TabItem中的每个都需要一个控件来显示内容。TabControl.Items我的程序正在使用ListView:
TabItem
TabControl.Items
ListView
tabItem.Content = new System.Windows.Controls.ListView();
创建每个ListView时,将SelectionMode属性设置为Single。(为什么这没有发生,如果Single是默认值,是一个谜......)
SelectionMode
Single