optimized tab switching logic
This commit is contained in:
1 parent
41c661da1a
commit
03a4777d29
5 files changed
+48
-12
No files matched your search
@@ -4,6 +4,7 @@ using System.Collections.Specialized;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Controls.Primitives;
|
||||
using System.Windows.Input;
|
||||
|
||||
namespace HandyControl.Controls
|
||||
{
|
||||
@@ -51,7 +52,7 @@ namespace HandyControl.Controls
|
||||
InitializeSelection();
|
||||
}
|
||||
|
||||
internal void NotifyMouseClickedOnTabHeader(RibbonTabHeader tabHeader)
|
||||
internal void NotifyMouseClickedOnTabHeader(RibbonTabHeader tabHeader, MouseButtonEventArgs e)
|
||||
{
|
||||
if (_tabHeaderItemsControl == null)
|
||||
{
|
||||
@@ -110,11 +111,6 @@ namespace HandyControl.Controls
|
||||
return;
|
||||
}
|
||||
|
||||
if (e.RemovedItems.Count > 0 && ItemContainerGenerator.ContainerFromItem(e.RemovedItems[0]) is RibbonTab oldRibbonTab)
|
||||
{
|
||||
oldRibbonTab.IsSelected = false;
|
||||
}
|
||||
|
||||
SelectedItem = e.AddedItems[0];
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user