Skip to content

Why do I get the following error using the De Zest.WpfDocking library? #17

@jrosalesmeza

Description

@jrosalesmeza

Hello everyone, the error that is appearing is the following: This Visual is not connected to PresentationSource. ' It happens when I try to undock a window, however this only happens when I load the position of the windows from the XML file, because when the windows are docked without having imported their position it works normally.

Example of how I save the position of the windows:

        XmlReader xmlReader = XmlReader.Create (Path);
        var Layout = XamlReader.Load (xmlReader) as DockLayout; xmlReader.Close ();
        W_Contenedor.DockContenedor.Load (Layout, LoadDockItem);

Example of how to load the position of the windows:

        XmlReader xmlReader = XmlReader.Create (Path);
        var Layout = XamlReader.Load (xmlReader) as DockLayout; xmlReader.Close ();
        DockContenedor.Load (Layout, LoadDockItem);

However, the previous code is taken from the guide provided by the library.

Library link:
https://wpfdocking.devzest.com/articles/saving_and_loading_window_layout.html

Note: I can't see where the error is shown, because the exception is internal to the library.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions