Kategorie
This commit is contained in:
@@ -2392,25 +2392,23 @@ namespace FasdDesktopUi.Basics.UserControls
|
||||
|
||||
|
||||
#region DropDown
|
||||
private static bool IsInsidePageable(FrameworkElement fe)
|
||||
{
|
||||
return cUiElementHelper.GetFirstParentOfType<ComboBoxPageable>(fe) != null;
|
||||
}
|
||||
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)) return; // ComboBoxPageable macht das selbst
|
||||
|
||||
var parentBorder = cUiElementHelper.GetFirstParentOfType<Border>(fe);
|
||||
if (parentBorder != null)
|
||||
if (!(sender is FrameworkElement fe)) return;
|
||||
if (IsInsidePageable(fe) || IsHierarchicalControl(fe)) return; // Spezialfälle handeln Fokus selbst
|
||||
|
||||
var parentBorder = cUiElementHelper.GetFirstParentOfType<Border>(fe);
|
||||
if (parentBorder != null)
|
||||
cFocusInvoker.InvokeGotFocus(parentBorder, e);
|
||||
}
|
||||
|
||||
private void DropDownClosed(object sender, EventArgs e)
|
||||
{
|
||||
if (!(sender is FrameworkElement fe)) return;
|
||||
if (IsInsidePageable(fe)) return;
|
||||
if (!(sender is FrameworkElement fe)) return;
|
||||
if (IsInsidePageable(fe) || IsHierarchicalControl(fe)) return;
|
||||
|
||||
var parentBorder = cUiElementHelper.GetFirstParentOfType<Border>(fe);
|
||||
if (parentBorder != null)
|
||||
|
||||
Reference in New Issue
Block a user