Dirkster99 / AvalonDock

Our own development branch of the well known WPF document docking library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

BindingExpression in VS2013 theme

cuellius opened this issue · comments

commented

If I use VS2013 theme, I get these errors in Visual Studio's Output Window:
System.Windows.Data Error: 40 : BindingExpression path error: 'RootDocument' property not found on 'object' ''LayoutDocumentFloatingWindow' (HashCode=36044558)'. BindingExpression:Path=Model.RootDocument.IsActive; DataItem='LayoutDocumentFloatingWindowControl' (Name=''); target element is 'LayoutDocumentFloatingWindowControl' (Name=''); target property is 'NoTarget' (type 'Object')

Please, fix this issue.

commented

P. S. Version 4.0.0 from NuGet

commented

I found a solution (maybe it is only partial solution): Add to class LayoutDocumentFloatingWindow property RootDocument as:
public LayoutContent RootDocument => RootPanel?.Descendents(). OfType<LayoutDocumentPane().FirstOrDefault(p => p.IsVisible)?.SelectedContent;

Thanks for the feedback and suggestions but inventing a property just to make an error message go away is not a good fix. The right fix in this case to adjust the binding to the correct binding path which has slightly changed in comparison to the previously released version.