This is a migrated thread and some comments may be shown as answers.

RadPane DragEvent

2 Answers 83 Views
Docking
This is a migrated thread and some comments may be shown as answers.
aborg
Top achievements
Rank 1
aborg asked on 18 Jul 2012, 03:58 PM
I am trying to used an attached behavior on my RadDocking control to hook into a RadPane drag event. I am having a hard time getting the Drag Event to be fired when the pane is floating and being dragged. Is this functionality possible?

Here is my behavior that is not working:

public class PaneDragBehavior : Behavior<RadPane>
    {
        protected override void OnAttached()
        {
 
            AssociatedObject.PreviewDragEnter += (o, e) =>
                {
                    //do something
                };
         }
    }

<telerik:RadDocking AllowUnsafeMode="True" Name="RadDocking" Close="RadDockingClose" PaneStateChange="RadDocking_PaneStateChange" telerik:AnimationManager.AnimationSelector="{x:Null}" telerik:AnimationManager.IsAnimationEnabled="False">
        <telerik:RadDocking.DocumentHost>
            <telerik:RadSplitContainer Name="EncounterDetailsSplitContainer">
                <telerik:RadPaneGroup Name="EncounterDetailsPaneGroup">
                    <telerik:RadPaneGroup.Items>
                        <telerik:RadPane Header="Patient Claim"  CanUserClose="False" ContextMenuTemplate="{x:Null}" Name="PatientClaimPane" telerik:RadDocking.SerializationTag="PatientClaimPane" >
                            <telerik:RadPane.Content>
                                <Views:PatientClaimView x:Name="PatientClaimView"/>
                            </telerik:RadPane.Content>
                            <i:Interaction.Behaviors>
                                <behaviors:PaneDragBehavior />
                            </i:Interaction.Behaviors>
                        </telerik:RadPane>
                        <telerik:RadPane Header="Billing Activity" CanUserClose="False" ContextMenuTemplate="{x:Null}" Name="BillingActivityPane" telerik:RadDocking.SerializationTag="BillingActivityPane">
                            <Views:BillingActivityView x:Name="BillingActivityView"/>
                        </telerik:RadPane>
                        <telerik:RadPane Header="Provider Detail" CanUserClose="False" ContextMenuTemplate="{x:Null}" Name="ProviderDetailPane" telerik:RadDocking.SerializationTag="ProviderDetailPane">
                            <Views:ProviderDetailsView x:Name="ProviderDetailView" />
                        </telerik:RadPane>
                        <telerik:RadPane Header="Comments" CanUserClose="False" ContextMenuTemplate="{x:Null}" Name="CommentsPane" telerik:RadDocking.SerializationTag="CommentsPane">
                            <Views:CommentsView x:Name="CommentsView"/>
                        </telerik:RadPane>
                        <telerik:RadDocumentPane Header="Document Images" CanUserClose="False" ContextMenuTemplate="{x:Null}" Name="DocumentImagePane" telerik:RadDocking.SerializationTag="DocumentImagePane">
                            <Views:DocumentImageView x:Name="DocumentImageView" />
                        </telerik:RadDocumentPane>
                    </telerik:RadPaneGroup.Items>
                </telerik:RadPaneGroup>
            </telerik:RadSplitContainer>
        </telerik:RadDocking.DocumentHost>
         
    </telerik:RadDocking>

Thanks.

2 Answers, 1 is accepted

Sort by
0
Accepted
George
Telerik team
answered on 24 Jul 2012, 09:02 AM
Hello Brian,

The RadDocking control uses its own DnD implementation for the ToolWindows. What I would suggest is using a custom ToolWindow to detect whether is being dragged or not. You could accomplish this by inheriting the ToolWindow and passing it to the RadDocking. The ToolWindow has a overridable method OnDragStart which will suit your needs. Please, refer to the attached project.

Hope this helps.

Kind regards,
George
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
aborg
Top achievements
Rank 1
answered on 25 Jul 2012, 03:27 PM
Thanks, I will use this solution.
Tags
Docking
Asked by
aborg
Top achievements
Rank 1
Answers by
George
Telerik team
aborg
Top achievements
Rank 1
Share this question
or