RadPane DragEvent

3 posts, 1 answers
  1. aborg
    aborg avatar
    5 posts
    Member since:
    Apr 2012

    Posted 18 Jul 2012 Link to this post

    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:RadSplitContainer Name="EncounterDetailsSplitContainer">
                    <telerik:RadPaneGroup Name="EncounterDetailsPaneGroup">
                            <telerik:RadPane Header="Patient Claim"  CanUserClose="False" ContextMenuTemplate="{x:Null}" Name="PatientClaimPane" telerik:RadDocking.SerializationTag="PatientClaimPane" >
                                    <Views:PatientClaimView x:Name="PatientClaimView"/>
                                    <behaviors:PaneDragBehavior />
                            <telerik:RadPane Header="Billing Activity" CanUserClose="False" ContextMenuTemplate="{x:Null}" Name="BillingActivityPane" telerik:RadDocking.SerializationTag="BillingActivityPane">
                                <Views:BillingActivityView x:Name="BillingActivityView"/>
                            <telerik:RadPane Header="Provider Detail" CanUserClose="False" ContextMenuTemplate="{x:Null}" Name="ProviderDetailPane" telerik:RadDocking.SerializationTag="ProviderDetailPane">
                                <Views:ProviderDetailsView x:Name="ProviderDetailView" />
                            <telerik:RadPane Header="Comments" CanUserClose="False" ContextMenuTemplate="{x:Null}" Name="CommentsPane" telerik:RadDocking.SerializationTag="CommentsPane">
                                <Views:CommentsView x:Name="CommentsView"/>
                            <telerik:RadDocumentPane Header="Document Images" CanUserClose="False" ContextMenuTemplate="{x:Null}" Name="DocumentImagePane" telerik:RadDocking.SerializationTag="DocumentImagePane">
                                <Views:DocumentImageView x:Name="DocumentImageView" />

  2. Answer
    George avatar
    1332 posts

    Posted 24 Jul 2012 Link to this post

    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,
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. DevCraft banner
  4. aborg
    aborg avatar
    5 posts
    Member since:
    Apr 2012

    Posted 25 Jul 2012 Link to this post

    Thanks, I will use this solution.
Back to Top