Fixed small visual bugs

This commit is contained in:
Daniel Schick 2025-08-05 09:05:11 +02:00
parent 82c01c8936
commit 973b0c267c
4 changed files with 7 additions and 5 deletions

View File

@ -8,6 +8,7 @@ using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Threading;
namespace ENI2.Controls
{
@ -161,8 +162,9 @@ namespace ENI2.Controls
}
if (!abort)
{
var tabControl = Parent as ItemsControl;
tabControl.Items.Remove(this);
var tabControl = Parent as TabControl;
tabControl.SelectedItem = null;
_ = Dispatcher.BeginInvoke(new Action(() => tabControl.Items.Remove(this)), DispatcherPriority.Background);
}
};
dockPanel.Children.Add(closeButton);

View File

@ -12,7 +12,7 @@
mc:Ignorable="d"
d:DesignHeight="600" d:DesignWidth="800">
<GroupBox Name="portCallGroupBox" Header="{x:Static p:Resources.textPortCall}">
<ScrollViewer PreviewMouseWheel="ScrollViewer_PreviewMouseWheel">
<ScrollViewer>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="300" />

View File

@ -424,6 +424,6 @@ namespace ENI2.DetailViewControls
}
#endregion
}
}

View File

@ -66,7 +66,7 @@
</Setter>
</Style>
<Style TargetType="{x:Type enictrl:ClosableTabItem}">
<Style TargetType="{x:Type enictrl:ClosableTabItem}" BasedOn="{StaticResource {x:Type TabItem}}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type enictrl:ClosableTabItem}">