Telerik Forums
UI for WPF Forum
1 answer
2 views

My application utilizes the RadDocking control to manage layout, including a RadPane that hosts a CefSharp browser. I've observed that when this pane is docked and I reset the layout, everything functions as expected - the layout resets and the browser remains responsive. However, if I float the pane (detach it so it becomes a window) and then reset the layout, the browser within the pane freezes and becomes unresponsive.

Here's a simplified snippet of how the RadPane and browser are set up:

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition/>
            <RowDefinition Height="0.2*"/>
        </Grid.RowDefinitions>
        <telerik:RadDocking x:Name="radDocking" HasDocumentHost="False" SerializationTag="Docking">
            <telerik:RadSplitContainer telerik:RadDocking.SerializationTag="S1">
                <telerik:RadPaneGroup x:Name="RadPaneGroup1" telerik:RadDocking.SerializationTag="G1">
                    <telerik:RadPane x:Name="RadPane1" telerik:RadDocking.SerializationTag="P1">
                        <TextBlock Text="Pane 1"/>
                    </telerik:RadPane>
                </telerik:RadPaneGroup>
            </telerik:RadSplitContainer>
            <telerik:RadSplitContainer telerik:RadDocking.SerializationTag="S2">
                <telerik:RadPaneGroup x:Name="RadPaneGroup2" telerik:RadDocking.SerializationTag="G2">
                    <telerik:RadPane x:Name="RadPane2" telerik:RadDocking.SerializationTag="P2">
                        <wpf:ChromiumWebBrowser Name="Browser" Initialized="Browser_OnInitialized"/>
                    </telerik:RadPane>
                </telerik:RadPaneGroup>
            </telerik:RadSplitContainer>
        </telerik:RadDocking>
        <Button Grid.Row="1" Content="Reset Layout" Click="ResetLayout_Click"/>
    </Grid>

 public partial class MainWindow
 {
     public MainWindow()
     {
         InitializeComponent();
         SaveLayout();
     }
     
     private void Browser_OnInitialized(object sender, EventArgs e)
     {
         string videoUrl = "https://www.youtube.com/embed/JrNMyzsYr4M?autoplay=1&mute=1";

         string html = $@"
         <html>
             <head>
                 <meta charset='utf-8'>
             </head>
             <body style='margin:0; padding:0;'>
                 <iframe width='100%' height='100%' src='{videoUrl}' frameborder='0' allow='autoplay; encrypted-media' allowfullscreen></iframe>
             </body>
         </html>
         ";

         Browser.LoadHtml(html, "http://dummy.com");
     }

     private void SaveLayout()
     {
         using (IsolatedStorageFile storage = IsolatedStorageFile.GetUserStoreForAssembly())
         {
             using (var isoStream = storage.OpenFile("RadDocking_Layout.xml", FileMode.Create))
             {
                 radDocking.SaveLayout(isoStream);
                 isoStream.Seek(0, SeekOrigin.Begin);
                 StreamReader reader = new StreamReader(isoStream);
                 reader.ReadToEnd();
             }
         }
     }

     private void ResetLayout_Click(object sender, RoutedEventArgs e)
     {
         using (IsolatedStorageFile storage = IsolatedStorageFile.GetUserStoreForAssembly())
         {
             using (var isoStream = storage.OpenFile("RadDocking_Layout.xml", FileMode.Open))
             {
                 radDocking.LoadLayout(isoStream);
             }
         }
     }
 }

 

The primary question I have is: Why does the browser freeze only when the pane is floating and I reset the layout, and how can I prevent this without resorting to programmatically docking the pane before the reset?

 

Thanks.

Dimitar
Telerik team
 answered on 18 Mar 2024
0 answers
15 views

Hello,

I'm having some rendering issues with a HwndHost element (set as child of a Border object) that I've partially fixed using RadWindowInteropHelper.SetAllowTransparency method in a NonTrasparentWindowsGeneratedItemsFactory class.

However, there is still one problem, namely, when the window, which contains that Border element, is being maximised using the Telerik docking system, it doesn't render the content of the HwndHost element inside the Border (it looks empty). Also I've noticed that when the window is finally maximised, if the pointer goes over that empty area, the window disappears suddenly.

What could it be?

Thanks,

G.

Giuseppe
Top achievements
Rank 1
 asked on 12 Mar 2024
0 answers
11 views

I would like to create different styles and templates for the RadDocking. My current problem is to that in the RadDocking panes which were places inside the DocumentHost will have header (button for dragging, closing pinning) at top, otherwise (left, right, bottom etc) RadSplitContainer & RadPaneGroup will place buttons at bottom. 

I would to place all of them at top, seems like I would to have same behavior as DocumentHost, but everywhere. Cause when I'm tried modified template of RadPaneGroup, and placed the buttons at first Grid.Row it's breaking behavior of RadPanes when you would to Drag them.

Is it possible to enforce other RadSplitContainers & RadPaneGroups behave like DocumentHost?

 

Kostiantyn
Top achievements
Rank 1
Iron
 asked on 05 Mar 2024
0 answers
11 views

I'm currently working with the RadDocking control in a WPF application and facing a challenge with programmatically docking a floating panel. My goal is to dock a floating RadPane programmatically in a way that exactly replicates the user manually dragging it to dock.

Here's the scenario: When a user manually drags a RadPane to dock it, everything works as expected, including behaviors such as layout restoration (using Telerik's layout save and restore functionality). However, when I attempt to dock the same RadPane programmatically by moving it to a desired RadPaneGroup, the behavior differs. Specifically, after programmatically docking and then performing a layout restore, the previously docked RadPane disappears, which does not happen with manual docking.

rPanel.RemoveFromParent();
rPanGroup.Items.Add(rPanel);

I suspect that the programmatic approach might not replicate some internal state changes that occur with manual dragging and docking, affecting the layout restoration process.

Could anyone provide insights or guidance on how to programmatically dock a RadPane in a manner that fully mimics the manual drag-and-dock process, ensuring consistent behavior with layout restoration? Are there specific methods or properties in the RadDocking control that I should be utilizing to achieve this?

Any suggestions or examples would be greatly appreciated!

Ohad
Top achievements
Rank 3
Bronze
Iron
Iron
 asked on 03 Mar 2024
3 answers
25 views

Hello,

we found that in version R1 2024 of Telerik UI for WPF the opened dockable floating windows are set by default to be topmost also over other application windows.

This behaviour is easily reproducible in the demo application.  It is enough to set solution explorer as a floating dockable window in the First Look example of the Docking and open e.g. internet explorer over the Telerik demo application. In version R3 2023, the solution explorer window was not visible anymore, in R1 2024 is the window still visible.

Is it some new feature or bug?

Thank you.

Best regards,

Jakub

Martin Ivanov
Telerik team
 answered on 15 Feb 2024
0 answers
16 views
I have a RadPane within my application that users can detach to create a floating window through a drag action. I am seeking a method to programmatically re-dock this floating RadPane to its original position within the application's main window, without resorting to dragging it manually. I aim to achieve this re-docking process entirely through code. Furthermore, I prefer a solution that does not involve restoring the layout from a stream, as commonly suggested. Is there a direct approach or function provided by the Telerik UI for WPF library that facilitates this? My objective is to manage the docking state of RadPane programmatically.
Ohad
Top achievements
Rank 3
Bronze
Iron
Iron
 asked on 05 Feb 2024
2 answers
16 views

The screenshot shows the application with the 2023.3.1009 build and on the right with the new 2023.3.1114 build.

As you can see on the bottom of the radpane the is now a blue strip in front of the control.
What do i need o check or change to get rid of that again and have the same result as before?

Stijn
Top achievements
Rank 1
Iron
 answered on 19 Dec 2023
1 answer
20 views

Hi

I set the PaneStateChange event in RadDocking, but the argument of method is of type RadRoutedEventArgs that is useless  because it not contains information about the pane and the state. In https://docs.telerik.com/devtools/wpf/controls/raddocking/events/overview is written that the argument should be ActivePangeChangedEventArgs (that inherits from RadRoutedEventArgs but the cast give me null).

Telerik is 2023.02

Thank you

Luigi

 

Dinko
Telerik team
 answered on 07 Nov 2023
0 answers
25 views

Hi

I have a RadDocking with tabbed documenthost.
If I have only one tab in DocumentHost and I dragged it, the content of the floating window is empty, when I dock again the tab the content is correctly restored.
If I have many tabs in DocumentHost and I dragged one, the content is correctly displayed.

I attached two images that explain the two cases

With 2 or more tabs (correct):

With only one tab (empty) (the content of the second panel should be the same of first image)

 

Furthermore, in both cases the header is missing.

 

Thank you
Luigi

Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
 updated question on 02 Nov 2023
0 answers
38 views
I have an application where it contains a RadPane. When the user hover overs the pane, it opens up a RadGridView which contains a list. When the pane is pinned, user can click on the GridView and work with it. However when the pane is unpinned, Pane closes on clicking the RadGridView. The expectation is that, it should work exactly like the pinned RadPane.



Tried adding a CustomFlyoutBehavior which implements IFlyoutBehavior and tried working with OnPaneDeactivated, but the event is not getting hit when the RadPane closes on clicking the GridView. 

Thanks in advance.
Nikhil
Top achievements
Rank 1
 updated question on 30 Oct 2023
Narrow your results
Selected tags
Tags
+? more
Top users last month
horváth
Top achievements
Rank 2
Iron
Iron
Steve
Top achievements
Rank 2
Iron
Erkki
Top achievements
Rank 1
Iron
Mark
Top achievements
Rank 2
Iron
Iron
Veteran
Jakub
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
horváth
Top achievements
Rank 2
Iron
Iron
Steve
Top achievements
Rank 2
Iron
Erkki
Top achievements
Rank 1
Iron
Mark
Top achievements
Rank 2
Iron
Iron
Veteran
Jakub
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?