Force syntax highlighting - scrollviewers hidden

5 posts, 0 answers
  1. Philipp
    Philipp avatar
    11 posts
    Member since:
    Nov 2015

    Posted 28 Mar Link to this post

    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

  2. Martin
    Admin
    Martin avatar
    99 posts

    Posted 30 Mar Link to this post

    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 (x:Name 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 allow you to write beautiful native mobile apps using a single shared C# codebase.
  3. Philipp
    Philipp avatar
    11 posts
    Member since:
    Nov 2015

    Posted 30 Mar Link to this post

    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

     

  4. Martin
    Admin
    Martin avatar
    99 posts

    Posted 04 Apr Link to this post

    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.
  5. Philipp
    Philipp avatar
    11 posts
    Member since:
    Nov 2015

    Posted 04 Apr Link to this post

    Hello Martin,

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

    Best regards,
    Philipp

Back to Top