diff --git a/Dragablz/Dockablz/LayoutAccessor.cs b/Dragablz/Dockablz/LayoutAccessor.cs index 002538c..82d4160 100644 --- a/Dragablz/Dockablz/LayoutAccessor.cs +++ b/Dragablz/Dockablz/LayoutAccessor.cs @@ -1,5 +1,9 @@ using System; using System.Collections.Generic; +using System.Linq; +using System.Windows; +using System.Windows.Media; +using Dragablz.Core; namespace Dragablz.Dockablz { @@ -22,7 +26,7 @@ public LayoutAccessor(Layout layout) if (branch != null) _branchAccessor = new BranchAccessor(branch); else - _tabablzControl = Layout.Content as TabablzControl; + _tabablzControl = Layout.VisualTreeDepthFirstTraversal().OfType().FirstOrDefault(); } public Layout Layout