3

I am Using AvalonDock in a WPF project. And I would like to konw how to handle the Docking and Undocking event. i have tried MouseDown and Up while Dragging but no apparent success.

...

<ad:DockingManager x:Name="dockManager" Grid.Row="2" Margin="0,25,0,0" Background="Transparent" >
                            <ad:ResizingPanel Orientation="Vertical" >
                                <ad:ResizingPanel Orientation="Horizontal" >
                                    <ad:DocumentPane Background="Transparent">
                                        <ad:DocumentContent Title="Document View!">
                                            <Grid Background="Transparent">
                                            <Rectangle Name="rect_Zoom" Grid.Row="2" MouseLeftButtonDown="rect_Zoom_MouseDown" MouseMove="rect_Zoom_MouseMove" MouseWheel="rect_Zoom_MouseWheel" MouseUp="rect_Zoom_MouseUp"  />

...

Bayo Alen
  • 341
  • 1
  • 6
  • 13
  • You could try the `DockableContent.StateChanged` event, and check if the state is changes to/from `DockableContentState.Docked`. – Merlyn Morgan-Graham Oct 20 '11 at 19:01
  • I am not using DockableContent but only an DocumentPane – Bayo Alen Oct 20 '11 at 19:41
  • Please edit your question to clarify this. I am not seeing much implementation for that class, and nothing related to state or docking, or specialized docking events, so you might be stuck with implementing this yourself unless you swap control types. BTW, I'm just looking at the source code at: http://avalondock.codeplex.com/SourceControl/list/changesets – Merlyn Morgan-Graham Oct 20 '11 at 20:33
  • 1
    I added the way i implemented the DocumentPane with avalondock in my project. i am able to undock and dock at will but i would like to catch the undock event to customize the background color as the undocking process reset the background color. thank's again Merylyn – Bayo Alen Oct 21 '11 at 12:10
  • the main problem is, once undocked, i cannot catch the mouse event on the undocked windows anymore – Bayo Alen Oct 21 '11 at 12:16

0 Answers0