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

RadRibbonWindow in PRISM 7

3 Answers 244 Views
Window
This is a migrated thread and some comments may be shown as answers.
Herald
Top achievements
Rank 1
Veteran
Iron
Herald asked on 14 Sep 2020, 03:25 AM

Hello 

I am trying to migrate a WPF app to PRISM 7. 

The MainWindow (Shell) is a RadRibbonWindow, hence it doe not migrate as it seems it is not of type Window.

I followed the instructions highlighted here (https://docs.telerik.com/devtools/wpf/knowledge-base/kb-radwindow-prismapplication-createshell), but I am missing a critical piece of information.

- Where do I find the "TelerikShell" type? Which dll, out of the many Telerik dlls that comes with WPF?

Also, if you have a working sample application that used PRISM 7 that you can sher would appreciate it.

 

Thanks

Herald

3 Answers, 1 is accepted

Sort by
0
Dilyan Traykov
Telerik team
answered on 16 Sep 2020, 12:20 PM

Hello Herald,

In the particular KB article which you referenced, the TelerikShell is the particular RadWindow which needs to be shown. It is not a Telerik-specific class and in your particular case would be the MainWindow (RadRibbonWindow).

A good example of an integration between the Telerik UI for WPF controls and the Prism 7 framework can be found in the Docking with Prism 7 demo from our SDK Samples Browser. The source code of the demo is also availabe in our GitHub repository.

Please have a look and let me know if you manage to display the RadRibbonWindow as expected.

Regards,
Dilyan Traykov
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
Herald
Top achievements
Rank 1
Veteran
Iron
answered on 16 Sep 2020, 03:30 PM

Thanks Dilyan.

The sample is very useful. However, I am still running into an issue.

If you run the sample locally, and if I add a RadRibbonWindow window file, and try to substitute ShellWindow (which is of RadWIndow type) with RadRibbonWindow1 (which is of RadRibbonWindow type), the app fails at runtime at line:  

MainWindow = shellWindow.ParentOfType<Window>();

of the App.xaml.cs.

It seems it works with a RadWindow but not with a RadRibbonWindow. I find that strange seems they should both be inherited by the same Window object.

Perhaps, I could take another route and create a Shell of type RadWindow and a large region inside it as a usercontrol and replicate the RadRibbonWindow functionality. But it would mean alot of extra work, and practically having to have two Shell objects, one being a shell of a shell.

Perhaps if you can look and see if you can get it to work with a RadRibbonWindow, it would be of great help.

 

Thanks

Herald

0
Dilyan Traykov
Telerik team
answered on 18 Sep 2020, 03:06 PM

Hello Herald,

Please excuse me for misleading you, actually, the RadRibbonWindow does inherit from the Window class, so overriding the OnInitialized method is not necessary.

The only modification which is required is to return the window in the CreateShell method, like so:

        protected override Window CreateShell()
        {
            var w = Container.Resolve<ShellView>();
            return w;
        }
I've attached the modified example to my reply for your reference. Please have a look and let me know if this works for you.

Regards,
Dilyan Traykov
Progress Telerik

Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive, special prizes, and more, for FREE?! Register now for DevReach 2.0(20).

Tags
Window
Asked by
Herald
Top achievements
Rank 1
Veteran
Iron
Answers by
Dilyan Traykov
Telerik team
Herald
Top achievements
Rank 1
Veteran
Iron
Share this question
or