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

Force syntax highlighting - scrollviewers hidden

4 Answers 58 Views
ExpressionEditor
This is a migrated thread and some comments may be shown as answers.
Philipp
Top achievements
Rank 1
Philipp asked on 28 Mar 2017, 05:43 AM

Hello,

is it possible to force syntax highlighting, after setting expression in ExpressionEditor via property ExpressionText? (coming from binding)
On VisualStudio2013_Dark u can't read the expression without highlighting.

 

What i'm doing wrong? The scrollviewers bottom on editor categories and selected category items are hidden?
I'm using Telerik.Windows.Themes.VisualStudio2013 2017.1.313.40. The ExpressionEditor is in a GridRow with height of 300. It should be high enough?!

<telerik:RadExpressionEditor Grid.Row="5"
ExpressionText="{Binding RollenExpression.Expression, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
Item="{Binding Source={x:Static slapz:MainWindowViewModel.Instance}, Path=Users[0]}"
ExpressionChanged="ExpressionEditor_OnExpressionChanged"
x:Name="ExpressionEditor"/>

 

Thanks for any reply.

Regards
Philipp

4 Answers, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 30 Mar 2017, 03:16 PM
Hi Philipp,

I have managed to reproduce the issue with variable success. It seems to be a bug in the highlighting when there has been an invalid expression followed by a change in the invalid expression text or another invalid expression. There is no way at the moment to force the highlighting logic to be executed externally. Furthermore, I cannot seem to find a decent workaround in order to set a light foreground color in every case, especially when the value is coming from an external source - like a binding. I have logged a bug report about this issue and you can track its progress here. I have updated your points for reporting that.

One very questionable suggestion could be when the external expression value is changed, first to pass to the RadExpressionEditor a valid expression (might be even - (just a minus sign)) and after that to pass the new value.

As for the ScrollViewers - the border for the info  EditorInfoPanel) has a MinHeight of  76 and when there is not enough space it stands on top of the 2 trees. They have a MinHeight of 146. For this theme with the current template, the RadExpressionEditor needs at least 420 available height for the ScrollViewers to fit entirely. You can modify the template of the RadExpressionEditor to change these values to better fit your project.

Regards,
Martin
Telerik by Progress
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 you to write beautiful native mobile apps using a single shared C# codebase.
0
Philipp
Top achievements
Rank 1
answered on 30 Mar 2017, 05:15 PM

Hi Martin,

thank you for your answer. The height of 420 solved my problem. I think I've tried just up to a height of 400.

The expression that is coming from a binding is valid. I've testet a simple expression like:
BooleanPropertyName = True
The attached RadGridView was filtered correctly. The highlighting logic only starts, if i add (for example) a minus sign to remove it again.
"BooleanPropertyName = True-" then back to "BooleanPropertyName = True"

Regards,
Philipp

 

0
Martin
Telerik team
answered on 04 Apr 2017, 02:40 PM
Hello Philipp,

We are glad that we solved at least that issue. As for the highlighting - it is executed only when the expression is changed and not when the expression text is changed, most probably that is why it fails even when the expression is valid and is executed again when you add a minus, as it treats the change as a change of the expression and not only its text. In any case, it is a bug and the highlighting should be executed properly.

Regards,
Martin
Telerik by Progress
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.
0
Philipp
Top achievements
Rank 1
answered on 04 Apr 2017, 07:20 PM

Hello Martin,

thanks again for your answer. I'll waiting for the next releases. Maybe they'll fix the bug.

Best regards,
Philipp

Tags
ExpressionEditor
Asked by
Philipp
Top achievements
Rank 1
Answers by
Martin
Telerik team
Philipp
Top achievements
Rank 1
Share this question
or