Telerik Docking with PRISM 8 (Controls without XAML)

1 Answer 29 Views
Docking
Dirk
Top achievements
Rank 1
Iron
Dirk asked on 24 Aug 2022, 04:27 PM

Hi Stenly,

I think this is my last question.
Then I'll will finish my PoC with the Telerik WPF controls.

Now I still know that I have to build my application with the Telerik controls without the embedded XAML.

I have still a problem to run the Docking controls with PRISM 8 without the XAML libs.
With the XAML libs everything ist fine.

My demo projects:

1.) Prism 8 default solution from Brian Lagunas template pack extended by the Telerik solution of using Docking with Prism 7 (from Telerik SDK Samples Browser).
Samles is using the embedded XAML version.
=> Everything works fine
Please have a look at the attached image

2.) Prism 8 default solution from Brian Lagunas template pack extended by the Telerik solution of using Docking with Prism 7 (from Telerik SDK Samples Browser).
Samles isn't (!) the embedded XAML version.
=> The RadDocking header are missing.
Please have a look at the attached image

I think I'm still missing to set any style somewhere.

Thanks 

Dirk

 

 

 

Dirk
Top achievements
Rank 1
Iron
commented on 26 Aug 2022, 06:55 AM

I've tried to solve this problem for 2 days now without success.
To get RadPane headers it is possible to add title properties instead of the header properties, but at least the Telerik (No Xaml) Version don't seems to work for my concern:

- Dynamic themes (OK)
- Dynamic menu with VM Binding(OK)
- Dynamic language switch (OK)
- Docking (Prism Regions) (Don't work)

I'll check if I get the Telerik (Xaml) Version to run in any way

- Dynamic themes with StyleManager (OK)
- Dynamic menu with VM Binding (?)
- Dynamic language switch (OK)
- Docking (Prism Regions) (?)

 

Stenly
Telerik team
commented on 29 Aug 2022, 12:41 PM

Would it be possible to provide a bit more information regarding the contents of this comment as I am not sure that I fully understand?

In addition, regarding this sentence "Dynamic themes with StyleManager"  please note that switching themes at runtime is only supported with the Implicit Styling theming approach (using NoXaml assemblies). The StyleManager does not support switching the themes at runtime.

Dirk
Top achievements
Rank 1
Iron
commented on 29 Aug 2022, 02:23 PM

Hi Stenly,

As a fallback I would have used the 'xaml' version with the possibility to change the theme with restarting the app.
But now you found a way to use the 'NoXaml' version. Perfekt!

Best regards

Dirk

Stenly
Telerik team
commented on 29 Aug 2022, 02:45 PM

Hello Dirk,

I am pleased to hear that the proposed suggestions have resolved the unwanted behavior when using the NoXaml version of the assemblies. Let me know if any further assistance is required.

1 Answer, 1 is accepted

Sort by
1
Accepted
Stenly
Telerik team
answered on 29 Aug 2022, 12:37 PM

Hello Dirk,

I have examined the project from the TelerikPrism8WithDockingWithoutXaml zip file (which uses the NoXaml version of the assemblies) and have found the cause of the missing headers. The reason for this behavior is that the custom RadPane and RadDocumentPane elements are not based on the RadPaneStyle style (which contains their default control templates). 

To prevent this from occurring, you could set the Style property of each custom RadPane and RadDocumentPane element to be the RadPaneStyle. The following code snippet shows this logic applied to one of the custom RadDocumentPane panes:

<telerik:RadDocumentPane x:Class="TelerikPrism8WithDocking.Modules.ModuleName.Views.AdditionalView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
             xmlns:mvvm="http://prismlibrary.com/"
             mvvm:ViewModelLocator.AutoWireViewModel="True"
             mc:Ignorable="d" Header="Additional View"
             d:DesignHeight="450" d:DesignWidth="800" Style="{StaticResource RadPaneStyle}">
    <Grid>
        <TextBlock Text="Additional View" FontSize="50" HorizontalAlignment="Center" VerticalAlignment="Center"/>
    </Grid>
</telerik:RadDocumentPane>

Alternatively, global styles could be created with their TargeType property being set to the type of the custom panes. These styles should be based on the RadPaneStyle via the BasedOn property. The following snippet shows this approach's implementation:

xmlns:views1="clr-namespace:TelerikPrism8WithDocking.Modules.ModuleName.Views;assembly=TelerikPrism8WithDocking.Modules.ModuleName"

<Style TargetType="views1:AdditionalView" BasedOn="{StaticResource RadPaneStyle}"/>
<Style TargetType="views1:BrowseView" BasedOn="{StaticResource RadPaneStyle}"/>
<Style TargetType="views1:IncomingView" BasedOn="{StaticResource RadPaneStyle}"/>
<Style TargetType="views1:OutgoingView" BasedOn="{StaticResource RadPaneStyle}"/>
<Style TargetType="views1:SentView" BasedOn="{StaticResource RadPaneStyle}"/>

Both of these approaches will produce the following result:

With this said, could you give these approaches a try and let me know how it goes?

Regards,
Stenly
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Dirk
Top achievements
Rank 1
Iron
commented on 29 Aug 2022, 02:20 PM | edited

Hi Stanly,

thank you very much.
It seems to work fine.

I'll advice my customer to buy the Telerik WPF controls now.

I've attached now the complete working solution.
Maybe it will help also other persons to use PRISM 8 with Telerik Docking without the 'xaml' version.

Regards 

Dirk

Stenly
Telerik team
commented on 29 Aug 2022, 02:43 PM

Hello Dirk,

I am happy to hear that the inquiries have now been resolved and that you took the time to notify us. Please let me know if I could be of any further help regarding this matter.

Tags
Docking
Asked by
Dirk
Top achievements
Rank 1
Iron
Answers by
Stenly
Telerik team
Share this question
or