We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

ArgumentOutOfRangeException and error in design view when DoubleTextBox is in focus, but builds fine

Hi Syncfusion team,

I get an error whenever I click on any part of the DoubleTextBox XAML code. The code can build fine, but I would like to know the cause of this error. I don't encounter this issue when I use the IntegerTextBox.

I made a sample project and only added the DoubleTextBox line of code:

<Window
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:syncfusion="http://schemas.syncfusion.com/wpf" x:Class="TestDoubleTextBox.MainWindow"
        Title="MainWindow" Height="350" Width="525">
   
    <Grid>
        <syncfusion:DoubleTextBox Value="0" Width="100"/>
    </Grid>
</Window>

As soon as I click on any part of the <syncfusion:DoubleTextBox Value="0" Width="100"/> line, I get the following error in the design view:

ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index


StackTrace:
at System.ThrowHelper.ThrowArgumentOutOfRangeException()
   at System.Collections.Generic.List`1.get_Item(Int32 index)
   at Syncfusion.Windows.Shared.MaskHandler.MatchWithMask(MaskedTextBox maskedTextBox, String text)
   at Syncfusion.Windows.Shared.MaskedTextBox.OnTextChanged(TextChangedEventArgs e)
   at System.Windows.Controls.Primitives.TextBoxBase.OnTextContainerChanged(Object sender, TextContainerChangedEventArgs e)
   at System.Windows.Controls.TextBox.OnTextContainerChanged(Object sender, TextContainerChangedEventArgs e)
   at System.Windows.Documents.TextContainerChangedEventHandler.Invoke(Object sender, TextContainerChangedEventArgs e)
   at System.Windows.Documents.TextContainer.EndChange(Boolean skipEvents)
   at System.Windows.Documents.TextContainer.System.Windows.Documents.ITextContainer.EndChange(Boolean skipEvents)
   at System.Windows.Documents.TextRangeBase.EndChange(ITextRange thisRange, Boolean disableScroll, Boolean skipEvents)
   at System.Windows.Documents.TextRange.System.Windows.Documents.ITextRange.EndChange(Boolean disableScroll, Boolean skipEvents)
   at System.Windows.Documents.TextRange.ChangeBlock.System.IDisposable.Dispose()
   at System.Windows.Controls.TextBox.OnTextPropertyChanged(String oldText, String newText)
   at System.Windows.Controls.TextBox.OnTextPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.Controls.TextBox.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
   at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
   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 System.Windows.Baml2006.WpfKnownMemberInvoker.SetValue(Object instance, Object value)
   at MS.Internal.Xaml.Runtime.ClrObjectRuntime.SetValue(XamlMember member, Object obj, Object value)
   at MS.Internal.Xaml.Runtime.ClrObjectRuntime.SetValue(Object inst, XamlMember property, Object value)

InnerException: None



I have exactly the same error when playing with the WPF sample. When I click to another line, I can see my design view again with the double text box. I don't get any build errors and it runs and functions fine. But I really would like to get down to the root of the problem, and would appreciate any help you could shed on the matter. It seems I have all the references I'd need, since it does work..

4 Replies

MA Muthukumar A Syncfusion Team May 6, 2015 04:50 AM UTC

Hi Coder,

 

Thanks for your interest in Syncfusion products.

 

We actually couldn’t reproduce the Designer Crash issue in our side , If you could provide more information such as version of Syncfusion Essential Studio you are using and the version of framework, we can dig deep into this and can help you at earliest.

 

Regards,

Muthukumar A



CO Coder May 6, 2015 10:42 AM UTC

Hi Muthukumar,

I'm running Essential Studio Version 13.1.0.21, Windows 8.1, Visual Studio Community 2013. I figured out the issue after some further digging -- I have a VS extension called XAML Regions (created by Jacob Johnston) installed. After disabling it, the DoubleTextBox works fine. Just thought I'd post this in case anyone else encounters this issue in the future.


CO Coder May 6, 2015 10:53 AM UTC

Sorry for double-posting, but just wanted to mention that strangely enough, after disabling and re-enabling the XAML Regions extension, everything seems to be working fine. No issues whatsoever anymore.


SC Saranya CJ Syncfusion Team May 7, 2015 07:18 AM UTC

Hi Cindy,

Thank you for your update. Please let us know if you require further assistance on this.

Regards,
Saranya

Loader.
Live Chat Icon For mobile
Up arrow icon