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

LayoutControlSplitter outside of window

1 Answer 302 Views
LayoutControl
This is a migrated thread and some comments may be shown as answers.
Ghiath
Top achievements
Rank 1
Ghiath asked on 22 Aug 2020, 06:25 PM

Hi, I'm new to Telerik and have the following problem.
I am currently using the LayoutControlSplitter.

The problem is that if I move the splitter right to the end of the window it goes outside the window.

Code:

 <Grid>    
<telerik:RadLayoutControl>   
<telerik:LayoutControlExpanderGroup Header="Expander group" />           
<telerik:LayoutControlSplitter />            
<Button Content="Button" />        
</telerik:RadLayoutControl>
</Grid>

How can I fix the problem? Thank you very much!

1 Answer, 1 is accepted

Sort by
0
Vladimir Stoyanov
Telerik team
answered on 26 Aug 2020, 10:27 AM

Hello Ghiath,

Thank you for the shared pictures.

It seems that you want to split two controls using the LayoutControlSplitter without showing the infinite ScrollBar underneath. The RadLayoutControl doesn't support this behavior out of the box. The LayoutControlSplitter control will resize the left sibling element infinitely. If that is the only functionality that you need, you can consider using a Grid with a GridSplitter.

To implement this with the RadLayoutControl, you can create an attached property and set it to the LayoutControlSplitter control. Then in its handler, you can subscribe to the Loaded event of the left control. And in its handler, you can get the index of the splitter and subscribe to the SizeChanged event of the left control. There you can set the width of the right control depending on whether the splitter moved right or left. For your convenience, I have a created a sample project demonstrating this approach.

I hope you find this helpful.

Regards,
Vladimir Stoyanov
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
LayoutControl
Asked by
Ghiath
Top achievements
Rank 1
Answers by
Vladimir Stoyanov
Telerik team
Share this question
or