Hello,
We are using the RadSyntaxEditor (R1 2020). Everything has been good with it but I wanted to report a possible bug. It isn't affecting our users because they are old and all have bad eyes, but someone somewhere might care :)
We have found that we can scroll to make the text larger but that anytime we scroll to 50% or lower the following exception gets thrown:
Exception {"'∞' is not a valid value for property 'Y2'."} System.Exception {System.ArgumentException}
at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
at Telerik.Windows.Controls.SyntaxEditor.UI.Margins.LineNumberMargin.UpdateUIOverride(UIUpdateContext updateContext)
at Telerik.Windows.Controls.SyntaxEditor.UI.Margins.SyntaxEditorMarginsCollection.UpdateUI(UIUpdateContext updateContext)
at Telerik.Windows.Controls.SyntaxEditor.UI.Margins.SyntaxEditorMargins.UpdateUI(UIUpdateContext updateContext)
at Telerik.Windows.Controls.SyntaxEditor.Layout.SyntaxEditorLayout.Arrange()
at Telerik.Windows.Controls.SyntaxEditor.UI.SyntaxEditorPresenter.ArrangeOverride(Size finalSize)
at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)
at System.Windows.UIElement.Arrange(Rect finalRect)
at MS.Internal.Helper.ArrangeElementWithSingleChild(UIElement element, Size arrangeSize)
at System.Windows.Controls.ContentPresenter.ArrangeOverride(Size arrangeSize)
at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)
at System.Windows.UIElement.Arrange(Rect finalRect)
at System.Windows.Controls.Control.ArrangeOverride(Size arrangeBounds)
at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)
at System.Windows.UIElement.Arrange(Rect finalRect)
at System.Windows.Controls.Grid.ArrangeOverride(Size arrangeSize)
at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)
at System.Windows.UIElement.Arrange(Rect finalRect)
at System.Windows.Controls.Grid.ArrangeOverride(Size arrangeSize)
at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)
at System.Windows.UIElement.Arrange(Rect finalRect)
at System.Windows.Controls.Grid.ArrangeOverride(Size arrangeSize)
at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)
at System.Windows.UIElement.Arrange(Rect finalRect)
at System.Windows.Controls.Border.ArrangeOverride(Size finalSize)
at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)
at System.Windows.UIElement.Arrange(Rect finalRect)
at System.Windows.Controls.Grid.ArrangeOverride(Size arrangeSize)
at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)
at System.Windows.UIElement.Arrange(Rect finalRect)
at System.Windows.Controls.Control.ArrangeOverride(Size arrangeBounds)
at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)
at System.Windows.UIElement.Arrange(Rect finalRect)
at Telerik.Windows.Controls.LayoutControl.VerticalLayoutControlPanelStrategy.Arrange(Size finalSize)
at Telerik.Windows.Controls.LayoutControl.LayoutControlPanel.ArrangeOverride(Size finalSize)
at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)
at System.Windows.UIElement.Arrange(Rect finalRect)
at MS.Internal.Helper.ArrangeElementWithSingleChild(UIElement element, Size arrangeSize)
at System.Windows.Controls.ItemsPresenter.ArrangeOverride(Size arrangeSize)
at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)
at System.Windows.UIElement.Arrange(Rect finalRect)
at System.Windows.Controls.ScrollContentPresenter.ArrangeOverride(Size arrangeSize)
at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)
at System.Windows.UIElement.Arrange(Rect finalRect)
at System.Windows.ContextLayoutManager.UpdateLayout()
at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
at System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork()
at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
at System.Windows.Media.MediaContext.AnimatedRenderMessageHandler(Object resizedCompositionTarget)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
The syntax editor sits in a LayoutControlGroup inside a vertically oriented RadLayoutControl. The abbreviated xaml code looks something like this below:
<telerik:LayoutControlGroup x:Name="TopLayout"
Orientation="Vertical"
Height="400"
FocusManager.FocusedElement="{Binding ElementName=SyntaxEditor}">
<telerik:RadToolBar ... />
<telerik:RadSyntaxEditor Name="SyntaxEditor"
IsTabStop="True"
AcceptsReturn="True"
Focusable="True"
Language="Sql"
CaretDisplayMode="Normal"
KeyDown="SyntaxEditor_KeyDown"
ScrollViewer.VerticalScrollBarVisibility="Visible"
PreviewSyntaxEditorMouseLeftButtonDown="SyntaxEditor_PreviewSyntaxEditorMouseLeftButtonDown"
SelectionChanged="SyntaxEditor_SelectionChanged"
DocumentContentChanging="SyntaxEditor_DocumentContentChanging"/>
</telerik:LayoutControlGroup>
Hope this helps.
Tim