2
AvalonDock
과 작동하도록 WPF에서 내 응용 프로그램을 변환하려고합니다. 나는 약간의 창문 (약 10)과 주 형태가 DockingManager
이다. 그 안에 창문을 넣고 싶습니다. DockingManager
. 나는 이것을 시도했다 :AvalonDock 창 고정
<ad:DockingManager x:Name="MainWindow">
<ad:DocumentPane x:Name="Windows" />
</ad:DockingManager>
FormDocumentSearch formDocumentSearch = new FormDocumentSearch(dc, this); //create window
DockableContent dct = new DockableContent() { Title = "Window" }; //create DockableContent
dct.Content = formDocumentSearch; //put the window in the DockableContent
Windows.Items.Add(dct);
이 나에게 다음과 같은 오류를 제공합니다 : Window must be the root of the tree. Cannot add Window as a child of Visual.
가.
어떻게해야합니까? Window
을 넣거나 수정하여 디자이너를 사용하고 AvalonDock
에 넣을 수있는 방법은 무엇입니까?