update to v1.3.2
This commit is contained in:
1 parent
bd3608a73e
commit
ac3e41e9e6
57 files changed
+634
-318
No files matched your search
@@ -1,4 +1,6 @@
|
||||
// ReSharper disable once CheckNamespace
|
||||
using System.Windows.Controls;
|
||||
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
/// <summary>
|
||||
@@ -10,5 +12,19 @@ namespace HandyControlDemo.UserControl
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void TabControl_OnSelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||
{
|
||||
if (e.AddedItems.Count == 0) return;
|
||||
if (e.AddedItems[0] is TabItem tabItem && tabItem.Content is ListBox listBox)
|
||||
{
|
||||
if (listBox.SelectedItem != null)
|
||||
{
|
||||
var item = listBox.SelectedItem;
|
||||
listBox.SelectedIndex = -1;
|
||||
listBox.SelectedItem = item;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user