Telerik Forums
UI for WPF Forum
1 answer
6 views

Hello,

I am currently working with RadDocking and trying to achieve the following scenario: I have three RadSplitContainers named left, middle, and right. My goal is to make the middle RadSplitContainer auto resizable when either the left or right Rad containers are set to auto hide. In other words, I want the middle container to automatically adjust its size to accommodate the space left by the hidden containers. Could you please guide me on how to achieve this behavior?

Thank you

Here is my code:

 <telerik:RadDocking  BorderThickness="0" Name="RadDocking" >
     <telerik:RadSplitContainer Orientation="Vertical" InitialPosition="DockedLeft"  Width="270" Height="840">
         <telerik:RadPaneGroup Name="TopLeft"  TabStripPlacement="Top" VerticalAlignment="Top"  Height="200 " >
             <telerik:RadPane Name="TopLeft1" Header="TopLeft1" >
             </telerik:RadPane>
             <telerik:RadPane Name="TopLeft2" Header="TopLeft2" />
         </telerik:RadPaneGroup>
         <telerik:RadPaneGroup Name="BottomLeft" TabStripPlacement="Top" >
             <telerik:RadPane Name="BottomLeft1" Header="BottomLeft2">
             </telerik:RadPane>
             <telerik:RadPane Name="BottomLeft2" Header="BottomLeft2" >
             </telerik:RadPane>
         </telerik:RadPaneGroup>
     </telerik:RadSplitContainer>
     <telerik:RadSplitContainer   Width="600" >
         <telerik:RadPaneGroup Background="GhostWhite"  >
             <telerik:RadPane  Name="Middle1" Header="Middle" Tag="Blue" CanUserClose="True" Background="Transparent" >
             </telerik:RadPane>
         </telerik:RadPaneGroup>
     </telerik:RadSplitContainer>
     <telerik:RadSplitContainer  InitialPosition="DockedRight" Name="TopRight" Width="350" Height="640">
         <telerik:RadPaneGroup >
             <telerik:RadPane Header="TopRight" >
             </telerik:RadPane>
         </telerik:RadPaneGroup>
     </telerik:RadSplitContainer>
 </telerik:RadDocking>

Thank you!

 

Martin Ivanov
Telerik team
 answered on 22 May 2024
0 answers
8 views
When the RadDocking control is added, the window will blank for a moment and then display normally
Telerik
Top achievements
Rank 1
 updated question on 16 May 2024
1 answer
11 views

Hi,

   I'm using a RadDocking with the VisualStudio2019 Dark theme.

   I'm getting confused as the header background styling is up side down in RadPane and RadTabItem leading to poor user experience.

   How can I have the same styling behavior as RadTabItem header applied to RadPane header ?

 

Thanks.

 

Stenly
Telerik team
 answered on 24 Apr 2024
0 answers
25 views

Hi
I change a grid with a raddocking in order to allow resizing of space between my two controls.
It woks well but there is a border around pane that I don't want because is not nice inside the context (I highlight it in yellow):

Here the piece of xaml:

<t:RadDocking
	Grid.Row="1" Grid.Column="1"
	HasDocumentHost="False"
	BorderThickness="0">		
	<t:RadSplitContainer
		InitialPosition="DockedRight"
		Visibility="{Binding ComandiGrafici.PercentiliGridVisibility,
			Converter={StaticResource BoolToVis}}"
		BorderThickness="0">
		<t:RadPaneGroup>
			<t:RadPane
				BorderThickness="0"
				PaneHeaderVisibility="Collapsed">
				<local:PercentiliControl 		
                                        Margin="0, 0, 5, 0"/>
			</t:RadPane>
		</t:RadPaneGroup>
		</t:RadSplitContainer>
		<t:RadSplitContainer
			InitialPosition="DockedLeft"
			BorderThickness="0">
			<t:RadPaneGroup
				BorderThickness="0">
				<t:RadPane
					PaneHeaderVisibility="Collapsed"
					BorderThickness="0">
					<WpfPlot
						Loaded="WpfPlot_Loaded"
						Background="Azure"												 
						AxesChanged="WpfPlot_AxesChanged" AllowDrop="True"
						MouseMove="WpfPlot_MouseMove"
						MouseDoubleClick="_wpfPlot_MouseDoubleClick"
						Visibility="{Binding IsGraphicView, Converter={StaticResource BoolToVis}}"
						t:RadContextMenu.ContextMenu="{StaticResource PlotContextMenu}"/>
				</t:RadPane>
			</t:RadPaneGroup>
	</t:RadSplitContainer>
</t:RadDocking>

 

Note that by default the border is double, I hide one setting BorderThickness="0" in RadDocking tag.

Can I hide the second border?
Thank you

Luigi

 

Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
 updated question on 18 Apr 2024
1 answer
25 views
Hi
I'm using RadDocking.LoadLayout to save and restore the positions of docked panels.
My application is localized and every string in xaml is set in this form (for instance...):

Header="{DynamicResource ResourceKey={x:Static r:ResourcesKeys.key}}"
Where r:ResourcesKey.key is an index in the language dictionary selected in the application.

When I change the localization with  an existing xml for layout, the headers of panels are read from the xml and are in the previous language.
Ho can I force to rewrite the strings in the right language (without delete the layout xml file)?

Thank you
Luigi

Martin Ivanov
Telerik team
 answered on 16 Apr 2024
1 answer
20 views

Hello,

I have a floating RadPane, I need to identify when the user stops dragging it. It can be still floating and and not docked.

Stenly
Telerik team
 answered on 08 Apr 2024
2 answers
29 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.

Ohad
Top achievements
Rank 3
Bronze
Iron
Iron
 updated answer on 21 Mar 2024
0 answers
39 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
24 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
29 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?