Show negative value as typed

2 posts, 1 answers
  1. Scott Waye
    Scott Waye avatar
    111 posts
    Member since:
    Nov 2009

    Posted 02 Mar 2014 Link to this post

    Hi I want to set up the RadMaskedNumericInput so that the negative sign appears when that key is pressed straight away and not delayed until the subsequent digit is entered, so if you type "-", "1", then the control displays first "-", then "-1".  Basically exactly as you would get in Notepad.  I have:

    <UserControl x:Class="GridViewMaskedInput.MainPage"
            xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
            xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
            xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
            xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
            xmlns:gridViewMaskedInput="clr-namespace:GridViewMaskedInput"
            xmlns:maskedInput="clr-namespace:Telerik.Windows.Controls.MaskedInput;assembly=Telerik.Windows.Controls.Input"
            mc:Ignorable="d" d:DesignWidth="640" d:DesignHeight="480">
        <StackPanel>

            <telerik:RadMaskedNumericInput  SelectionOnFocus="SelectAll" Width="100"
    Value="{Binding Total, Mode=TwoWay}"
    Mask="" TextMode="PlainText"
                                            FormatString="##.00"
                                            AutoFillZeros="False"
                                            maskedInput:MaskedInputExtensions.Maximum="99"
                                            maskedInput:MaskedInputExtensions.Minimum="-99"
    />

        </StackPanel>
    </UserControl>

    Note I want Mask="" as I find the behaviour with the Mask set as unusual, and placeholders annoying for just entering numbers.

    Thanks,

    Scott
  2. Answer
    Pavel R. Pavlov
    Admin
    Pavel R. Pavlov avatar
    1182 posts

    Posted 05 Mar 2014 Link to this post

    Hello Scott,

    Thank you for contacting us on that matter. You are right for the behavior of the control. This is why we decided to log it into our system as a feedback item for future evaluation. You can follow the status of the item in our feedback portal.

    As a small sign of appreciation I updated your Telerik account.

    Regards,
    Pavel R. Pavlov
    Telerik

    DevCraft Q1'14 is here! Join the free online conference to see how this release solves your top-5 .NET challenges. Reserve your seat now!

  3. DevCraft banner
Back to Top