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

Can I use RadDocking for displaying of multiple views in one view which is Prism UserControl?

14 Answers 210 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Dmitry
Top achievements
Rank 1
Dmitry asked on 02 Aug 2016, 12:49 PM
I bag your pardon - I've gotten error in the title of previouse post. I develop C# WPF MVVM Prism 6 application. My application' solution comprises Shell project (where main window is RadWindow) and numerous Prism module projects. Each project of these PrismModule projects has Views (Prism UserControl) and ViewModels (PrismViewModel). I need to define in the one of the modules (in Prism module not in Shell) several Views (approximetly 8). Seven of them must dysplay real-time chart each. Suppose these seven Views have a shared ViewModel. And the one remaining View (call it 'A' view) must comprise all abovementioned seven Views and display them all at the same time. So my question is the following: Can I use RadDocking for this purpose? I've found two your blogs about using RadDocking with Prism: "http://www.telerik.com/blogs/using-raddocking-with-prism-in-wpf-silverlight" and "http://www.telerik.com/blogs/using-the-raddocking-control-with-prism". But both of them are written about such using of RadDocking in Shell. But I need to use RadDocking in the same manner in a Prism UserControl that is a View in a Prism module. In addition, these two blogs specified using of MEF, but I use Unity dependecy injection in my application. So, can I use RadDocking for the purpose described above? Please answer me.

14 Answers, 1 is accepted

Sort by
0
Dmitry
Top achievements
Rank 1
answered on 02 Aug 2016, 02:10 PM
I bag your pardon. I wrote: "In addition, these two blogs specified using of MEF....". I've gotten an error - the first blog specify Unity dependency injection. But your answer to my question above is very important for me.
0
Dmitry
Top achievements
Rank 1
answered on 03 Aug 2016, 07:40 AM

I bag your pardon for my poor English but I will do one more addition here.

1) The RadDocking with regions for view-switching navigation must be used only in one Prism module where abovementioned seven Views displaying their real-time charts are and where the 'A' View which must display all of these seven chart-Views is. Shell project must use native (default) Prism regions for view-switching navigation. So 'A' View itself must be placed in native (default) Prism region in Shell when the navigation to 'A' View has place. Is it possible to use RadDocking with regions and native (default) Prism <ContentControl prism:RegionManager.RegionName="MainContentRegion"...../> in one solution ?

2) I use Unity Dependency injection in my application.Your application example which downloaded from "http://www.telerik.com/blogs/using-the-raddocking-control-with-prism" uses Unity Dependency injection too. But as I understand this example is out of date for using of Prism 6 and v.2016.2.613.45 Telerik binaries. Your apgraded application example from "http://www.telerik.com/blogs/using-raddocking-with-prism-in-wpf-silverlight" using MEF. So I'd like to ask: Can I do in my application (where Telerik binaries have 2016.2.613.45 version and where I have Prism 6) as it proposed in out of date example form "http://www.telerik.com/blogs/using-the-raddocking-control-with-prism"? Please answer me.

0
Nasko
Telerik team
answered on 03 Aug 2016, 10:29 AM
Hello Yaroslav,

From the provided description we are not exactly sure that we completely understand your full scenario. However, we created a sample project that demonstrates how to use RadDocking with Unity - it is similar to the example demonstrated in this blog post and uses the latest version of Unity.

Please, notice also that using RadDocking with Unity has not been fully tested and there might be some limitations or incompatibility issues. Because of that we recommend you to use MEF with RadDocking - from all of our tests when working with RadDocking and Prism with using MEF no unexpected issues have been recorded.

Please, check the attached sample and let us know if you have any additional questions concerning it.

We hope this will help you.

Regards,
Nasko
Telerik by Progress
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
0
Dmitry
Top achievements
Rank 1
answered on 04 Aug 2016, 05:41 AM

Thank you very much, Nasko. Your example is very useful and I'm very grateful for it. In principle, this is what I was needed. The example works nicely. But I have one question: Can I make a dynamic addition and removal of regions as removing and adding of views is done in your VisualStudioDocking_WPF example application? That is, for example, when a user set (check) an appropriate CheckBox then an appropriate region is added in Prism UserControl. When user unset (uncheck) the CheckBox then the region is hidden. When user set the CheckBox  again then the region is becoming visible again. Is it possible to implement?

Thank you very much in advance.

0
Dmitry
Top achievements
Rank 1
answered on 04 Aug 2016, 07:45 AM
Excuse me please, but one more addition here is. In addition to capability of switching between Visible / Invisible  for each region is it possible to implement capability of Zooming In (to the full screen) and Zooming Out (to its original size) for each region without regarding to whether the region is docable or floating?
0
Nasko
Telerik team
answered on 04 Aug 2016, 12:29 PM
Hello Yaroslav,

Please, check the attached sample that demonstrates how to achieve the desired functionality of hiding and visualizing the Panes similar to the functionality demonstrated in our example VisualStudioDocking. - the approach basically uses the IEventAggregator in order to execute events which hides and visualizes the Panes.

As for your second questions about the zooming I am not exactly sure that I completely understand the desired - could you please provide us some additional information about it?

We hope this will help you.

Regards,
Nasko
Telerik by Progress
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
0
Dmitry
Top achievements
Rank 1
answered on 05 Aug 2016, 05:33 AM

Hello, Nasko. Thank you very much for your last example. It is fine except for one thing: FileServicesModule class and the next code-behind classes: Shell, ActivateViewA, ActivateViewB and ActivateViewB2 use the next attributes: [Export], [ImportingConstructor] and [Import]. As far as I understand, these are the attributes using with MEF library. So, where is Unity dependency injection in the example? I use only Unity dependency injection in my application and don't use any abovementioned attributes. Therefore, if possible ofcourse, please give me the analogical example using Unity dependency injection only.

Thank you very much in advance.

0
Dmitry
Top achievements
Rank 1
answered on 05 Aug 2016, 09:41 AM
And one more question: How can I make the regions were initially invisible?  I try to set for telerik:RadPane its 'IsHidden' property to false in design-time or try to set for telerik:RadPane its 'Visibility' property to Hidden or Collapsed in design-time but this is doesn't help. After completion of loading of application and navigation to the view where RadDocking is, the regions in this view remain visible. Is it possible to make them were initially invisible?
0
Nasko
Telerik team
answered on 08 Aug 2016, 10:20 AM
Hi Yaroslav,

I have used the Import and Export annotations only for test purposes. You do not need them in order to make the proposed in the example approach work as expected. You could delete those annotations and everything will be working as expected.

As for your second question in order to make the Panes initially invisible the IsHidden property should be set to True.

We have modified the sample by removing the attributes in order to demonstrate the example does not need them to work and demonstrated hot to set the IsHidden property in order to hide the Panes initially.

Hope this helps.

Regards,
Nasko
Telerik by Progress
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
0
Dmitry
Top achievements
Rank 1
answered on 09 Aug 2016, 10:36 AM
Hello, Nasko. Thank you very much for your help and support and for your last application example espacially. It is nice! But tell me please the following: Is telerik:RadPane.IsHidden a dependency property and it can be controlled through the binding as other dependency properties in WPF as, for example, TextBox.Text property?
0
Nasko
Telerik team
answered on 10 Aug 2016, 08:09 AM
Hi Yaroslav,

The IsHidden property of RadPane is a DependencyProperty so, you could bind it without any concerns.

Hope this information will be helpful for you.

Regards,
Nasko
Telerik by Progress
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
0
Dmitry
Top achievements
Rank 1
answered on 12 Aug 2016, 09:46 AM

Hello, Nasko. So if I have such XAML markup:

. . . . . . . . . . . . . . . .
<telerik:RadSplitContainer>
   <telerik:RadPaneGroup>
      <telerik:RadPane Header="Sound Velocity" prism:RegionManager.RegionName="SoundVelocityChartRegion" IsHidden="{Binding F_Hidden}"/>
   </telerik:RadPaneGroup>
</telerik:RadSplitContainer>
. . . . . . . . . . . . . . . .

And such C# code in appropriate View Model:

. . . . . . . .
private bool _f_Hidden;
public bool F_Hidden
{
   get { return this._f_Hiden; }
   set { this.SetProperty(ref this._f_Hidden, value); }
}
. . . . . . . .

So I can control of visibility of SoundVelocityChartRegion region with all Views this region comprising by setting of value of F_Hidden property to "true" or "false"? Am I correct?
0
Accepted
Nasko
Telerik team
answered on 15 Aug 2016, 09:36 AM
Hi Yaroslav,

You are absolutely right. If the IsHidden is set through binding it should hide/show the Pane without a concern and as expected.

Hope this helps.

Regards,
Nasko
Telerik by Progress
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
0
Dmitry
Top achievements
Rank 1
answered on 15 Aug 2016, 01:19 PM
Thank you.
Tags
Docking
Asked by
Dmitry
Top achievements
Rank 1
Answers by
Dmitry
Top achievements
Rank 1
Nasko
Telerik team
Share this question
or