Error -- A common Ancestor

Sep 16, 2009 at 9:11 PM

Hi,

I am trying to use the avalonDock in my WPF application. I am  just learning it. I got one error or bug I am not sure the error is like

" The specified Visual and this Visual do not share a common ancestor, so there is no valid transformation between the two visuals."

How to product this error??

Here is sample of my code and steps to reproduct this...

Code:

 

<font size="2" color="#a31515"><font size="2" color="#a31515">

 

</font></font><font size="2" color="#a31515">

 

</font>

<my:DockingManager Margin="12,45,12,177" Name="dockingManager1" >

 

<font size="2" color="#a31515"><font size="2" color="#a31515">

 

</font></font><font size="2" color="#a31515">

 

</font>

<my:ResizingPanel Margin="33,23,61,0" Name="resizingPanel1" Height="184" VerticalAlignment="Top" >

 

<font size="2" color="#a31515"><font size="2" color="#a31515">

 

</font></font><font size="2" color="#a31515">

 

</font>

<my:DockablePane>

 

<font size="2" color="#a31515"><font size="2" color="#a31515">

 

</font></font><font size="2" color="#a31515">

 

</font>

<my:DockableContent Title="ChildWindow1">

 

<font size="2" color="#a31515"><font size="2" color="#a31515">

 

</font></font><font size="2" color="#a31515">

 

</font>

<RichTextBox Height="50" Width="100"></RichTextBox>

 

<font size="2" color="#a31515"><font size="2" color="#a31515">

 

</font></font><font size="2" color="#a31515">

 

</font>

</my:DockableContent>

 

<font size="2" color="#a31515"><font size="2" color="#a31515">

 

</font></font><font size="2" color="#a31515">

 

</font>

</my:DockablePane>

 

<font size="2" color="#a31515"><font size="2" color="#a31515">

 

</font></font><font size="2" color="#a31515">

 

</font>

</my:ResizingPanel>

 

<font size="2" color="#a31515"><font size="2" color="#a31515">

 

</font></font><font size="2" color="#a31515">

 

</font>

 

</my:DockingManager>

Intension is simple. Just trying to make a floting window with richtextbox or textbox in side it.

Whenever i tried to change the size of the rich text box. it breaks and shows the error i mention.

Any help please

Thanks,

Nick

 

Sep 17, 2009 at 8:28 AM

Hi, as I can see from your xaml, you're creating a single resizepanel with single dockablepane and dockable content within. This layout schema is not supported. Try to add at least a documentpane.

For a getting started tutorial refer to this article http://www.youdev.net/post/2008/09/25/AvalonDock-Tutorial.aspx

Thanks

Ado

 

Nov 20, 2009 at 5:49 PM

Thanks Ado.

Yeh i went through it. And it is working good.