linq to sql - Save and load decimal in windows phone built-in database -


i use built-in database engine on wp8 app.

when save decimal value, e.g. 3.5 value stored in database follows: 3.5000. when load value database 3.5000 shown in textbox. how can change behaivoir?

note: if debug code see 3.5m. textbox displays 3.5000. default windows phone stores decimal value decimal(29,4)

thanks help. michael

you can format value using stringformat when binding textbox in xaml e.g.

text="{binding latitude, stringformat=\{0:n2\}}" 

i've not tried myself, general ("g") format specifier you're after. have experiment stringformat property achieve you're after.


Comments

Popular posts from this blog

Python Kivy ListView: How to delete selected ListItemButton? -

asp.net mvc 4 - A specified Include path is not valid. The EntityType '' does not declare a navigation property with the name '' -