Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
275
Formatting numbers with percentage sign
posted

Hi,

I want to format the numbers entered in xamdatagrid  to have percentage sign(ex : when user enters 30 it should be displayed as 30%). I created a style for xamtextEditor and used that in grid. The percent sign is displayed but if user enters 3 it is displayed as 300%. Please help .Below is the style:

 

        <Style  x:Key="PercentStyle"  TargetType="{x:Type igEditors:XamTextEditor}">

            <Style.Setters>

                <Setter Property="ValueType" Value="{x:Type System:Decimal}"/>

                <Setter Property="Format" Value="###.##%"/>

                <Setter Property="InvalidValueBehavior" Value="RetainValue" />

                <Setter Property="HorizontalContentAlignment" Value="Right"/>

            </Style.Setters>

        </Style>

Parents Reply Children
No Data