xceedsoftware / wpftoolkit

All the controls missing in WPF. Over 1 million downloads.
Other
3.87k stars 872 forks source link

Move AvalonDock to second screen #1296

Open AliFlux opened 6 years ago

AliFlux commented 6 years ago

Hi.

Is there a possibility to programmatically move the AvalonDock (LayoutDocument or LayoutDocumentPaneGroup) to second monitor?

Thanks.

P.S.

Moving a single window/document to a second screen would be relatively easier, but moving a set of LayoutDocument to second screen, creating a sort of new window with those documents, would be restively trickier (as per my conclusion).

wjkhappy14 commented 6 years ago

有点难

Dirkster99 commented 5 years ago

You could try using the DockingManager's properties and methods:

...but this still leaves you with the issue of figuring out what the Windows 10 monitor configuration is and which position is valid or invalid for any given 2 monitor scenario as I just found out in issue 20.

The most natural scenario is to let the user drag the document/tool window to wherever it should be - save the layout and restore it (explizitely or on application close/re-start). This should work with the fix in the referenced issue. Could you test and give feedback if it works for you?