Hi
I have used XamNumericEditor and XamCurrencyEditor to display values in particular format like "Format=.000000"
Initially the format of value should not be displayed when we open the window.
After that,when the textbox is focused then it should display the format of value in the textbox.
Please find the attached file for clear picture.
Hi Saravanan,
I used your xaml and made a few changes. I think I ended up with what you want. I also add a xamNumericEditor for the Quantity property. You should include a ValueType reference there if your data is not of the default Double type.
<TextBlock Text="Contract Value:" Grid.Row="0" Grid.Column="0"
HorizontalAlignment="Left" VerticalAlignment="Center" Margin="3,0,0,0"></TextBlock>
<igWPF:XamCurrencyEditor Grid.Row="0" Grid.Column="1" Width="120"
HorizontalAlignment="Left" VerticalAlignment="Center"
Margin="5,3,0,3"
Mask="{}{double:-15.3}" Format="##,###,###.###"
DisplayMode="Raw" DataMode="Raw"
HorizontalContentAlignment="Right"
Text="{Binding ContractValue}"
IsEnabled="{Binding IsContractValueEnable}"/>
<TextBlock Text="Quantity:" Grid.Row="1" Grid.Column="0" Margin="3,0,0,0"
HorizontalAlignment="Left" VerticalAlignment="Center"></TextBlock>
<igWPF:XamNumericEditor Grid.Row="1" Grid.Column="1" Width="80"
HorizontalAlignment="Left" VerticalAlignment="Center" Margin="5,3,0,3"
InvalidValueBehavior="RevertValue"
PromptChar=""
Text="{Binding Quantity}"
ValueType="{x:Type sys:Int16}"
Mask="###" Format="###" >
</igWPF:XamNumericEditor>
<TextBlock Text="Premium Rate:" Grid.Row="2" Grid.Column="0" Margin="3,0,0,0"
<igWPF:XamNumericEditor Grid.Row="2" Grid.Column="1" Width="80"
Mask="{}{double:-2.6}" Format=" %"
DisplayMode="IncludeLiteralsWithPadding" DataMode="Raw"
Text="{Binding PremiumRate}"
IsEnabled="{Binding IsPremiumRateEnable}"
TabIndex="70">
<!-- I removed your reference to the SpinIncrement
SpinIncrement="0"
-->
<igWPF:XamNumericEditor.ValueConstraint>
<igWPF:ValueConstraint Nullable="False"/>
</igWPF:XamNumericEditor.ValueConstraint>
Let me know if this helps.
Hi Marianne
Your solution was helpful to some extent. I have queries for few more functionalities.
Kindly find the attached file for more details.
Regards