|
@@ -10,6 +10,7 @@ using Avalonia.Controls.Generators;
|
|
using Avalonia.Controls.Primitives;
|
|
using Avalonia.Controls.Primitives;
|
|
using Avalonia.Input;
|
|
using Avalonia.Input;
|
|
using Avalonia.Input.Platform;
|
|
using Avalonia.Input.Platform;
|
|
|
|
+using Avalonia.Layout;
|
|
using Avalonia.Threading;
|
|
using Avalonia.Threading;
|
|
using Avalonia.VisualTree;
|
|
using Avalonia.VisualTree;
|
|
|
|
|
|
@@ -163,6 +164,9 @@ namespace Avalonia.Controls
|
|
{
|
|
{
|
|
item.IsExpanded = true;
|
|
item.IsExpanded = true;
|
|
|
|
|
|
|
|
+ if (item.Presenter?.Panel is null)
|
|
|
|
+ (this.GetVisualRoot() as ILayoutRoot)?.LayoutManager.ExecuteLayoutPass();
|
|
|
|
+
|
|
if (item.Presenter?.Panel is { } panel)
|
|
if (item.Presenter?.Panel is { } panel)
|
|
{
|
|
{
|
|
foreach (var child in panel.Children)
|
|
foreach (var child in panel.Children)
|