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

RoutedCommand and floating Pane

3 Answers 52 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Andrea Gorin
Top achievements
Rank 2
Andrea Gorin asked on 29 Mar 2011, 03:31 PM
Hi,

I'm in this simple situation, my Shell contains 2 regions 
in the first region I have a botton with a RoutedCommand associated (RoutedMyCommand)
in the second region I have a RadDocking like this :

<telerikDocking:RadDocking>
    <telerikDocking:RadDocking.DocumentHost>
        <telerikDocking:RadSplitContainer>
            <telerikDocking:RadPaneGroup Regions:RegionManager.RegionName="Body" >
            </telerikDocking:RadPaneGroup>
        </telerikDocking:RadSplitContainer>
    </telerikDocking:RadDocking.DocumentHost>
</telerikDocking:RadDocking>

when I activate a new View ( a new RadPane ) in Body region, the RadPane is initially "Tabbed Document" and it handle correctly the RoutedMyCommand 
when the RadPane becomes "Floating" the RoutedMyCommand is not handled by View. 

Telerik version 2010.3.1110.35

Thanks, Andrea.

3 Answers, 1 is accepted

Sort by
0
George
Telerik team
answered on 04 Apr 2011, 08:22 AM
Hello Andrea,

 
When you make a RadPane floating, it is placed in a ToolWindow. The RadPane control is not placed in the same visual tree anymore, so this could lead to the problem you have. I would suggest you to use a DelegateCommand instead of RoutedCommand.

I hope this suits your needs.

Best wishes,
George
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Andrea Gorin
Top achievements
Rank 2
answered on 11 Apr 2011, 11:07 AM
Thanks for your answer, I tried to use a DelegateCommand  to communicate between the 2 Regions ( the first region contains the button, the second region contains the RadDocking ), using PRISM, I created an EventController ( that uses IUnityContainer, IEventAggregator, ... ) and all runs correctly even when the Pane is floating.

But this solution is not simple like using RoutedCommand, Could you give me an example  of using DelegateCommand in a situation like mine.

Thanks for all, Andrea.
0
George
Telerik team
answered on 14 Apr 2011, 09:02 AM
Hi Andrea,

 
I would suggest you defining a globally available command. For more information about command patterns in PRISM, please refer to msdn - http://msdn.microsoft.com/en-us/library/ff921122(v=PandP.40).aspx#sec5

Regards,
George
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Docking
Asked by
Andrea Gorin
Top achievements
Rank 2
Answers by
George
Telerik team
Andrea Gorin
Top achievements
Rank 2
Share this question
or