WPF TextBox Converter - Using a third value

  • Thread starter Thread starter Anders Eriksson
  • Start date Start date
A

Anders Eriksson

I have a dialog with three textboxes
NumberOfStrings
DistBtwStrings
TotalWidth

I use this to enter a definition for creating a fretboard (like on a
Guitar).

The user can enter either DistBtwStrings or TotalWidth and the other
value should be calculated. (TotalWidth = DistBtwStrings*NumberOfString)

So I thought that a converter should do the trick...

But I need to get the value of NumberOfStrings to convert. How do I do this?

Or is there a better way of doing it?

// Anders
 
Anders Eriksson said:
I have a dialog with three textboxes
NumberOfStrings
DistBtwStrings
TotalWidth

I use this to enter a definition for creating a fretboard (like on a
Guitar).

The user can enter either DistBtwStrings or TotalWidth and the other value
should be calculated. (TotalWidth = DistBtwStrings*NumberOfString)

So I thought that a converter should do the trick...

But I need to get the value of NumberOfStrings to convert. How do I do
this?

Or is there a better way of doing it?

Have a google for MultiValueConverters and see if they are what you want.

mick
 
Back
Top