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
25
Different behavior when binding mask
posted

Using the XamNumericEditor when i set explicitly the Mask in xaml as "{}{double:5.2}" the caret is placed as i want before the decimal separator.

If i set a property Mask in a view model and bind the value to Mask in xaml the caret is placed at the end of the text  and i can't type numbers.

Here is the code of the second case:

 <Editors:XamNumericEditor x:Name="Value"

 

 

Mask="{Binding Mask}"

 

 

PromptChar=" "

 

 

DataMode="IncludeBoth"

 

 

DisplayMode="IncludeLiterals"

 

 

IsAlwaysInEditMode="True"

 

 

Text="{Binding Value, UpdateSourceTrigger=PropertyChanged}" />

 

public string Mask

{

 

get

{

 

 

return "{double:5.2}";

}

}

Why is this happening? How could i get the first behaviour using data binding of the mask?