Kategorie

This commit is contained in:
Meik
2025-11-11 23:22:31 +01:00
parent 8cf1c84328
commit 5292a2cb0c
4 changed files with 175 additions and 159 deletions

View File

@@ -166,6 +166,8 @@
ComboBoxBackground="{DynamicResource BackgroundColor.DetailsPage.DataHistory.ValueColumn}"
BorderBrush="{DynamicResource BackgroundColor.Menu.SubCategory.Hover}"
SearchPlaceholderText="{Binding Converter={StaticResource LanguageConverter}, ConverterParameter=Searchbar.Placeholder}"
DropDownOpened="DropDownOpened"
DropDownClosed="DropDownClosed"
PreviewKeyDown="Combobox_PreviewKeyDown" />
<StackPanel>
<TextBlock Text="{Binding Converter={StaticResource LanguageConverter}, ConverterParameter=Dialog.CloseCase.Template}"

View File

@@ -2393,12 +2393,11 @@ namespace FasdDesktopUi.Basics.UserControls
#region DropDown
private static bool IsInsidePageable(FrameworkElement fe) => cUiElementHelper.GetFirstParentOfType<ComboBoxPageable>(fe) != null;
private static bool IsHierarchicalControl(FrameworkElement fe) => fe is HierarchicalSelectionControl;
private void DropDownOpened(object sender, EventArgs e)
{
if (!(sender is FrameworkElement fe)) return;
if (IsInsidePageable(fe) || IsHierarchicalControl(fe)) return; // Spezialfälle handeln Fokus selbst
if (IsInsidePageable(fe)) return; // ComboBoxPageable fired itself
var parentBorder = cUiElementHelper.GetFirstParentOfType<Border>(fe);
if (parentBorder != null)
@@ -2408,7 +2407,7 @@ namespace FasdDesktopUi.Basics.UserControls
private void DropDownClosed(object sender, EventArgs e)
{
if (!(sender is FrameworkElement fe)) return;
if (IsInsidePageable(fe) || IsHierarchicalControl(fe)) return;
if (IsInsidePageable(fe)) return;
var parentBorder = cUiElementHelper.GetFirstParentOfType<Border>(fe);
if (parentBorder != null)