This is a migrated thread and some comments may be shown as answers.

Show negative value as typed

1 Answer 24 Views
MaskedInput (Numeric, DateTime, Text, Currency)
This is a migrated thread and some comments may be shown as answers.
Scott Waye
Top achievements
Rank 1
Veteran
Scott Waye asked on 02 Mar 2014, 08:41 PM
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

1 Answer, 1 is accepted

Sort by
0
Accepted
Pavel R. Pavlov
Telerik team
answered on 05 Mar 2014, 12:17 PM
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!

Tags
MaskedInput (Numeric, DateTime, Text, Currency)
Asked by
Scott Waye
Top achievements
Rank 1
Veteran
Answers by
Pavel R. Pavlov
Telerik team
Share this question
or