left aligned numeric input

11 posts, 0 answers
  1. Sebastian
    Sebastian avatar
    12 posts
    Member since:
    Oct 2010

    Posted 21 Sep 2011 Link to this post

    Hello,

    is it possible to have  a left aligned RadMaskedNumericInput field? 

    Setting the HorizontalContentAlignment to left will show a left aligned value in view mode, but while editing there is a margin on the left side of the value. i tried to set the TextBoxStyle, but with no success.

    i know that numeric field typically aligned right, but sometimes there are exceptions ;)

  2. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 26 Sep 2011 Link to this post

    Hi Sebastian,

    I am not sure if I understand the issue correctly, but setting a Padding value of 0 should remove the space before the value when the HorizontalContentAlignment is Left:
    <telerik:RadMaskedNumericInput Width="100"
                         HorizontalAlignment="Center"
                         HorizontalContentAlignment="Left"
                         Mask="#3.2"
                         Padding="0"
                         Value="123.45" />
    The result on our side looks like this:

    Please give this a try and let me know if it works for you or if I am missing something.

    Regards,
    Tina Stancheva
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. UI for WPF is Visual Studio 2017 Ready
  4. Sebastian
    Sebastian avatar
    12 posts
    Member since:
    Oct 2010

    Posted 27 Sep 2011 Link to this post

    hello tina,

    the space i meant turned out to be the placeholders in editing mode. i set the placeholder to a space (" ") , so it looks like a margin or padding to me ;)

    but this may be a really bug:

    i made a little blend project to play around, just with one RadMaskedNumericInput field. when i close the window while the field has still the keyboard focus, i get a NullReferenceException.

    Unbehandelte Ausnahme: System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
       bei System.Windows.Documents.ImmComposition.UpdateNearCaretCompositionWindow()
       bei System.Windows.Documents.TextSelection.System.Windows.Documents.ITextRange.NotifyChanged(Boolean disableScroll, Boolean skipEvents)
       bei System.Windows.Documents.TextRangeBase.EndChange(ITextRange thisRange, Boolean disableScroll, Boolean skipEvents)
       bei System.Windows.Documents.TextSelection.System.Windows.Documents.ITextRange.Select(ITextPointer anchorPosition, ITextPointer movingPosition)
       bei System.Windows.Controls.TextBox.set_SelectionStart(Int32 value)
       bei Telerik.Windows.Controls.RadMaskedInputBase.set_SelectionStart(Int32 value)
       bei Telerik.Windows.Controls.RadMaskedNumericInput.ParseMask()
       bei Telerik.Windows.Controls.RadMaskedInputBase.CoerceStronglyTypeValueFromInternalValue()
       bei Telerik.Windows.Controls.RadMaskedInputBase.OnValueInternalChanged(DependencyObject d, DependencyPropertyChangedEventArgs args)
       bei System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
       bei System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
       bei System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
       bei System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, OperationType operationType)
       bei System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, OperationType operationType, Boolean isInternal)
       bei System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
       bei Telerik.Windows.Controls.RadMaskedNumericInput.CoerceValueOverride()
       bei Telerik.Windows.Controls.RadMaskedInputBase.CoerceValue(UpdateValueEvent updateEvent)
       bei Telerik.Windows.Controls.RadMaskedInputBase.OnLostFocus(Object sender, RoutedEventArgs e)
       bei System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
       bei System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
       bei System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
       bei System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
       bei System.Windows.UIElement.OnLostFocus(RoutedEventArgs e)
       bei System.Windows.Controls.Primitives.TextBoxBase.OnLostFocus(RoutedEventArgs e)
       bei System.Windows.UIElement.IsFocused_Changed(DependencyObject d, DependencyPropertyChangedEventArgs e)
       bei System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
       bei System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
       bei System.Windows.Controls.TextBox.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
       bei System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
       bei System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, OperationType operationType)
       bei System.Windows.DependencyObject.ClearValueCommon(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata)
       bei System.Windows.DependencyObject.ClearValue(DependencyPropertyKey key)
       bei System.Windows.Input.FocusManager.OnFocusedElementChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
       bei System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
       bei System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
       bei System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
       bei System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, OperationType operationType)
       bei System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, OperationType operationType, Boolean isInternal)
       bei System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
       bei System.Windows.Input.FocusManager.SetFocusedElement(DependencyObject element, IInputElement value)
       bei System.Windows.UIElement.OnPresentationSourceChanged(Boolean attached)
       bei System.Windows.FrameworkElement.OnPresentationSourceChanged(Boolean attached)
       bei System.Windows.PresentationSource.RootChanged(Visual oldRoot, Visual newRoot)
       bei System.Windows.Interop.HwndSource.set_RootVisualInternal(Visual value)
       bei System.Windows.Interop.HwndSource.set_RootVisual(Visual value)
       bei System.Windows.Window.SourceWindowHelper.ClearRootVisual()
       bei System.Windows.Window.CloseWindowFromWmClose()
       bei System.Windows.Window.WmClose()
       bei System.Windows.Window.WindowFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       bei System.Windows.Interop.HwndSource.PublicHooksFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       bei MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       bei MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
       bei System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
       bei System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
       bei System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
       bei System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Boolean isSingleParameter)
       bei System.Windows.Threading.Dispatcher.Invoke(DispatcherPriority priority, Delegate method, Object arg)
       bei MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
       bei MS.Win32.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
       bei MS.Win32.HwndSubclass.DefWndProcWrapper(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
       bei MS.Win32.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
       bei MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
       bei MS.Win32.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
       bei MS.Win32.HwndSubclass.DefWndProcWrapper(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
       bei MS.Win32.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
       bei MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
       bei MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
       bei System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
       bei System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
       bei System.Windows.Threading.Dispatcher.Run()
       bei System.Windows.Application.RunDispatcher(Object ignore)
       bei System.Windows.Application.RunInternal(Window window)
       bei System.Windows.Application.Run(Window window)
       bei System.Windows.Application.Run()
       bei WpfApplication1.App.Main() in d:\devel\blend\WpfApplication1\WpfApplication1\obj\Debug\App.g.cs:Zeile 0.

  5. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 30 Sep 2011 Link to this post

    Hello Sebastian,

    Unfortunately I wasn't able to reproduce this issue locally and this is why I wanted to ask for your assistance. We need more information on the matter in order to reproduce it and further investigate it on our side. Can you list the steps you took to reproduce. Also, do you reproduce it in Blend only, or in VS as well?

    I tried to reproduce it in Blend with this code:
    <Window x:Class="MaskedInput.MainWindow"
            Title="MainWindow"
            Width="525"
            Height="350">
        <telerik:RadMaskedNumericInput HorizontalAlignment="Stretch"/>
    </Window>
    If you can also send us a screencast demonstrating how you reproduce the issue, that would also be greatly appreciated.

    Thank you in advance for your cooperation.

    Best wishes,
    Tina Stancheva
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  6. Koren
    Koren avatar
    68 posts
    Member since:
    Oct 2010

    Posted 21 Oct 2011 Link to this post

    I was trying to switch from RadMaskedTextBox to RadMaskedNumericInput text boxes on a control and I am getting the same error as above if I leave the focus in the RadMaskedNumericInput text box when I close the window.  If I leave the focus on a RadComboBox, I get the second error.  If I have the focus on a RadMaskedTextBox, things are fine.

    Here is one of the numeric text boxes that I am using...  (Note: I tried to use Extensions but was getting a different error so I left it with a validation rule for now)

    <telerikInput:RadMaskedNumericInput x:Name="txtAutoExpense" Mask="p3.2" Width="{StaticResource SmallLabelWidth}" Margin="0,0,0,0" DockPanel.Dock="Left"
                                                                    SpinMode="None" IsClearButtonVisible="False" SelectionOnFocus="SelectAll"
                                                                    KeyboardNavigation.TabNavigation="Local" TextMode="PlainText"
                                                                    Validation.ErrorTemplate="{StaticResource TextBoxErrorTemplate}">
                                        <telerikInput:RadMaskedNumericInput.Value>
                                            <Binding Path="AllAutoExpensePercent" Mode="TwoWay" UpdateSourceTrigger="LostFocus">
                                                <Binding.ValidationRules>
                                                    <imKASHelper:PercentValidationRule Min="0.00" Max="100.00" />
                                                </Binding.ValidationRules>
                                            </Binding>
                                        </telerikInput:RadMaskedNumericInput.Value>
                                    </telerikInput:RadMaskedNumericInput>


    System.NullReferenceException was unhandled by user code
      Message=Object reference not set to an instance of an object.
      Source=PresentationFramework
      StackTrace:
           at System.Windows.Documents.ImmComposition.UpdateNearCaretCompositionWindow()
           at System.Windows.Documents.TextSelection.System.Windows.Documents.ITextRange.NotifyChanged(Boolean disableScroll, Boolean skipEvents)
           at System.Windows.Documents.TextRangeBase.EndChange(ITextRange thisRange, Boolean disableScroll, Boolean skipEvents)
           at System.Windows.Documents.TextSelection.System.Windows.Documents.ITextRange.Select(ITextPointer anchorPosition, ITextPointer movingPosition)
           at System.Windows.Controls.TextBox.set_SelectionStart(Int32 value)
           at Telerik.Windows.Controls.RadMaskedInputBase.set_SelectionStart(Int32 value) in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Controls\Input\MaskedInput\RadMaskedInputBase.Properties.cs:line 544
           at Telerik.Windows.Controls.RadMaskedNumericInput.ParseMask() in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Controls\Input\MaskedInput\RadMaskedNumericInput.cs:line 1055
           at Telerik.Windows.Controls.RadMaskedInputBase.CoerceStronglyTypeValueFromInternalValue() in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Controls\Input\MaskedInput\RadMaskedInputBase.cs:line 2492
           at Telerik.Windows.Controls.RadMaskedInputBase.OnValueInternalChanged(DependencyObject d, DependencyPropertyChangedEventArgs args) in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Controls\Input\MaskedInput\RadMaskedInputBase.Properties.cs:line 752
           at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
           at System.Windows.FrameworkElement.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, OperationType operationType)
           at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, OperationType operationType, Boolean isInternal)
           at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
           at Telerik.Windows.Controls.RadMaskedNumericInput.CoerceValueOverride() in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Controls\Input\MaskedInput\RadMaskedNumericInput.cs:line 478
           at Telerik.Windows.Controls.RadMaskedInputBase.CoerceValue(UpdateValueEvent updateEvent) in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Controls\Input\MaskedInput\RadMaskedInputBase.cs:line 2385
           at Telerik.Windows.Controls.RadMaskedInputBase.OnLostFocus(Object sender, RoutedEventArgs e) in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Controls\Input\MaskedInput\RadMaskedInputBase.cs:line 1609
           at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
           at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
           at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
           at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
           at System.Windows.UIElement.OnLostFocus(RoutedEventArgs e)
           at System.Windows.Controls.Primitives.TextBoxBase.OnLostFocus(RoutedEventArgs e)
           at System.Windows.UIElement.IsFocused_Changed(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, OperationType operationType)
           at System.Windows.DependencyObject.ClearValueCommon(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata)
           at System.Windows.DependencyObject.ClearValue(DependencyPropertyKey key)
           at System.Windows.Input.FocusManager.OnFocusedElementChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
           at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
           at System.Windows.FrameworkElement.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, OperationType operationType)
           at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, OperationType operationType, Boolean isInternal)
           at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
           at System.Windows.Input.FocusManager.SetFocusedElement(DependencyObject element, IInputElement value)
           at System.Windows.UIElement.OnPresentationSourceChanged(Boolean attached)
           at System.Windows.FrameworkElement.OnPresentationSourceChanged(Boolean attached)
           at System.Windows.PresentationSource.RootChanged(Visual oldRoot, Visual newRoot)
           at System.Windows.Interop.HwndSource.set_RootVisualInternal(Visual value)
           at System.Windows.Interop.HwndSource.set_RootVisual(Visual value)
           at System.Windows.Window.SourceWindowHelper.ClearRootVisual()
           at System.Windows.Window.CloseWindowFromWmClose()
           at System.Windows.Window.WmClose()
           at System.Windows.Window.WindowFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
           at System.Windows.Interop.HwndSource.PublicHooksFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
           at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
           at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
           at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
           at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
      InnerException:

    System.NullReferenceException was unhandled by user code
      Message=Object reference not set to an instance of an object.
      Source=PresentationFramework
      StackTrace:
           at System.Windows.Documents.ImmComposition.UpdateNearCaretCompositionWindow()
           at System.Windows.Documents.TextSelection.System.Windows.Documents.ITextRange.NotifyChanged(Boolean disableScroll, Boolean skipEvents)
           at System.Windows.Documents.TextRangeBase.EndChange(ITextRange thisRange, Boolean disableScroll, Boolean skipEvents)
           at System.Windows.Documents.TextSelection.System.Windows.Documents.ITextRange.Select(ITextPointer anchorPosition, ITextPointer movingPosition)
           at System.Windows.Controls.TextBox.set_SelectionStart(Int32 value)
           at Telerik.Windows.Controls.RadComboBox.RadComboBoxLostFocus(Object sender, RoutedEventArgs e) in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Controls\Input\ComboBox\RadComboBox.cs:line 2787
           at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
           at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
           at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
           at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
           at System.Windows.UIElement.OnLostFocus(RoutedEventArgs e)
           at System.Windows.Controls.Primitives.TextBoxBase.OnLostFocus(RoutedEventArgs e)
           at System.Windows.UIElement.IsFocused_Changed(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, OperationType operationType)
           at System.Windows.DependencyObject.ClearValueCommon(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata)
           at System.Windows.DependencyObject.ClearValue(DependencyPropertyKey key)
           at System.Windows.Input.FocusManager.OnFocusedElementChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
           at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
           at System.Windows.FrameworkElement.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, OperationType operationType)
           at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, OperationType operationType, Boolean isInternal)
           at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
           at System.Windows.Input.FocusManager.SetFocusedElement(DependencyObject element, IInputElement value)
           at System.Windows.UIElement.OnPresentationSourceChanged(Boolean attached)
           at System.Windows.FrameworkElement.OnPresentationSourceChanged(Boolean attached)
           at System.Windows.PresentationSource.RootChanged(Visual oldRoot, Visual newRoot)
           at System.Windows.Interop.HwndSource.set_RootVisualInternal(Visual value)
           at System.Windows.Interop.HwndSource.set_RootVisual(Visual value)
           at System.Windows.Window.SourceWindowHelper.ClearRootVisual()
           at System.Windows.Window.CloseWindowFromWmClose()
           at System.Windows.Window.WmClose()
           at System.Windows.Window.WindowFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
           at System.Windows.Interop.HwndSource.PublicHooksFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
           at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
           at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
           at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
           at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
      InnerException:

  7. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 26 Oct 2011 Link to this post

    Hello Koren,

     Unfortunately , we are unable to reproduce such exception with your code snippet. We will highly appreciated if you can send us a runnable sample demonstrating this issue cause this will be the best way to investigate it. Is this possible? Thank you in advance.

    Greetings,
    Petar Mladenov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  8. Koren
    Koren avatar
    68 posts
    Member since:
    Oct 2010

    Posted 01 Nov 2011 Link to this post

    I am trying to recreate this but can't seem to get the right conditions in a smaller project.  Can you give me a hint what the code is trying to do in the lines shown in my previous post and maybe I can figure out how to duplicate the problem?  I've checked it in debug mode and it goes right from window_closing into the RadMaskedInputBase code so I can't figure out what it thinks is null.
    thanks.
  9. Koren
    Koren avatar
    68 posts
    Member since:
    Oct 2010

    Posted 01 Nov 2011 Link to this post

    If it helps - when I walk through line by line on the project that gets an exception, it fails in RadMaskedNumericInput.ParseMask on line 1056.  On my good project, it went right by this line.  I'm sure it is something I have wrong in my project but can't seem to duplicate the issue in my small project.
    The stack at the time it fails is:
    RadMaskedInputBase.OnLostFocus 1610
    RadMaskedInputBase.CoerceValue 2385
    RadMaskedNumericInput.CoerceValueOverride 480
    RadMaskedInputBase.CoerceStrongly... 2492
    RadMaskedNumericInput.ParseMask 1056
  10. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 04 Nov 2011 Link to this post

    Hello Koren,

    We checked out the StackTrace you previously provided and we think that we recently resolved a similar issue. The fix will be included in the upcoming Q3 2011 Official Release. So is it possible for you to wait until the Q3 is released and see if the issue is still reproducible ?

    Regards,
    Petar Mladenov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  11. Koren
    Koren avatar
    68 posts
    Member since:
    Oct 2010

    Posted 04 Nov 2011 Link to this post

    I am working around it for now.  I'll watch for the Q3 release.
    thanks
  12. Koren
    Koren avatar
    68 posts
    Member since:
    Oct 2010

    Posted 17 Nov 2011 Link to this post

    Just picked up the Q3 release and this problem is now fixed.

    thanks!
Back to Top
UI for WPF is Visual Studio 2017 Ready