This is a migrated thread and some comments may be shown as answers.
Multiple editors on the same page
2 Answers 10 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Richard asked on 19 Dec 2019, 08:02 PM

Is is possible to have more than one editor on a page? 

When I add 3 like in the example below I can only interact with the first one. 

By the way, this is a great new control, thank you for adding it. 

02.    <StackPanel>
03.        <Grid Margin="0,4">
04.            <Grid.RowDefinitions>
05.                <RowDefinition Height="Auto"/>
06.                <RowDefinition Height="*"/>
07.            </Grid.RowDefinitions>
08.            <TextBlock Grid.Row="0" Text="Custom PowerShell"/>
09.            <telerik:RadSyntaxEditor x:Name="PsEditor" Grid.Row="1" MinHeight="400" />
10.        </Grid>
12.        <Grid Margin="0,4">
13.            <Grid.RowDefinitions>
14.                <RowDefinition Height="Auto"/>
15.                <RowDefinition Height="*"/>
16.            </Grid.RowDefinitions>
17.            <TextBlock Grid.Row="0" Text="Custom JavaScript"/>
18.            <telerik:RadSyntaxEditor x:Name="JsEditor" Grid.Row="1" MinHeight="400" />
19.        </Grid>
21.        <Grid Margin="0,4">
22.            <Grid.RowDefinitions>
23.                <RowDefinition Height="Auto"/>
24.                <RowDefinition Height="*"/>
25.            </Grid.RowDefinitions>
26.            <TextBlock Grid.Row="0" Text="Custom CSS"/>
27.            <telerik:RadSyntaxEditor x:Name="CssEditor" Grid.Row="1" MinHeight="400" />
28.        </Grid>
29.    </StackPanel>

2 Answers, 1 is accepted

Sort by
Dilyan Traykov
Telerik team
answered on 20 Dec 2019, 01:10 PM

Hello Richard,

Thank you for the provided code snippet.

It is indeed possible to define multiple RadSyntaxEditor control in one view but the issue with the setup you've shared is that the ScrollViewer takes the keyboard focus.

The only modification you need to make to enable input in all 3 controls is to set the Focusable property of the ScrollViewer to False.

<ScrollViewer Focusable="False">
Please give this a try and let me know if it solves your issue.

Dilyan Traykov
Progress Telerik

Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Top achievements
Rank 1
answered on 20 Dec 2019, 03:38 PM
Thank you Dilyan, it was the ScrollViewer taking focus. It working great now.
Asked by
Top achievements
Rank 1
Answers by
Dilyan Traykov
Telerik team
Top achievements
Rank 1
Share this question