Click here to Skip to main content
16,008,010 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: SSRS 2008 reports in Silverlight 4 apps Pin
arkiboys28-Oct-11 4:38
arkiboys28-Oct-11 4:38 
QuestionDisplay list content Pin
columbos1492725-Oct-11 23:13
columbos1492725-Oct-11 23:13 
AnswerRe: Display list content Pin
Pete O'Hanlon25-Oct-11 23:33
mvePete O'Hanlon25-Oct-11 23:33 
AnswerRe: Display list content Pin
Member 103390726-Oct-11 3:22
Member 103390726-Oct-11 3:22 
GeneralRe: Display list content Pin
Member 103390726-Oct-11 4:24
Member 103390726-Oct-11 4:24 
GeneralRe: Display list content Pin
Member 103390726-Oct-11 5:02
Member 103390726-Oct-11 5:02 
GeneralRe: Display list content Pin
SledgeHammer0126-Oct-11 8:46
SledgeHammer0126-Oct-11 8:46 
SuggestionString Formatting in XALM, Silverlight Pin
chrisndirangu25-Oct-11 21:30
chrisndirangu25-Oct-11 21:30 
Well, I had this problem where I got so many answers but they couldn't work together as I desired.

Now, I have a decimal (money) field from my repository.

After binding my collection to a grid using the Galasofts Mvvm framework, I want +ve values to take the #,###,###.## format and the -ve values to take the (#,###,###.##) format. Zero values will then take #.## format. All this formatting I want to happen in the xaml. Not in my view models.

Most solutions offered money formatting but the has the dollar sign, and we dont use dollars. Others wont cater for the negative value, and others will not cater for the decimals.

So the best solution is

“#,0.00;(#,0.00);0”

The first bit is the format for positive numbers.

The second bit is how negative numbers are displayed

The third bit is for zeros

Practical example:
Binding="{Binding Amount, StringFormat=#\,0.00;(#\,0.00);0}"
GeneralRe: String Formatting in XALM, Silverlight Pin
Mycroft Holmes25-Oct-11 21:39
professionalMycroft Holmes25-Oct-11 21:39 
QuestionWrapping Text in Canvas Pin
indian14325-Oct-11 13:43
indian14325-Oct-11 13:43 
AnswerRe: Wrapping Text in Canvas Pin
Mark Salsbery25-Oct-11 17:18
Mark Salsbery25-Oct-11 17:18 
GeneralRe: Wrapping Text in Canvas Pin
indian14325-Oct-11 17:23
indian14325-Oct-11 17:23 
GeneralRe: Wrapping Text in Canvas Pin
Mark Salsbery26-Oct-11 5:37
Mark Salsbery26-Oct-11 5:37 
GeneralRe: Wrapping Text in Canvas Pin
indian14326-Oct-11 6:15
indian14326-Oct-11 6:15 
GeneralRe: Wrapping Text in Canvas Pin
Mark Salsbery26-Oct-11 7:31
Mark Salsbery26-Oct-11 7:31 
GeneralRe: Wrapping Text in Canvas Pin
indian14326-Oct-11 7:58
indian14326-Oct-11 7:58 
GeneralRe: Wrapping Text in Canvas Pin
Mark Salsbery26-Oct-11 8:17
Mark Salsbery26-Oct-11 8:17 
GeneralRe: Wrapping Text in Canvas Pin
indian14326-Oct-11 12:18
indian14326-Oct-11 12:18 
QuestionHow to compile single project for Silverlight and then standard .NET Pin
Member 103390725-Oct-11 5:17
Member 103390725-Oct-11 5:17 
AnswerRe: How to compile single project for Silverlight and then standard .NET Pin
Member 103390726-Oct-11 21:50
Member 103390726-Oct-11 21:50 
QuestionLet user adjust control size Pin
Loveisasea24-Oct-11 19:57
Loveisasea24-Oct-11 19:57 
AnswerRe: Let user adjust control size Pin
Wayne Gaylard24-Oct-11 21:04
professionalWayne Gaylard24-Oct-11 21:04 
GeneralRe: Let user adjust control size Pin
Loveisasea24-Oct-11 21:55
Loveisasea24-Oct-11 21:55 
GeneralRe: Let user adjust control size Pin
Wayne Gaylard24-Oct-11 22:05
professionalWayne Gaylard24-Oct-11 22:05 
QuestionWPF Hyperlink Question Pin
Kevin Marois24-Oct-11 9:51
professionalKevin Marois24-Oct-11 9:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.