Silverlight Binding Question -


hi all,

i trying out hand silverlight first time , have question regarding binding. have form bound custom data object. on have 2 boxes labelled such:

driving experiece [textbox] years [textbox] months.

i need bind single integer property of drivingexperiencemonths. instance, if drivingexperiencemonths equal 29, see 2 in years textbox , 5 in months text box.

i can of course add listener text changed events text boxes , handle way, else on form using twoway binding, , hoping well.

thanks in advance

you in wpf implementing imultivalueconverter, unfortunately, isn't supported in silverlight.

the best option have viewmodel handle this. create "months" , "years" property automatically synchronizes drivingexperiencemonths value.

if want use oneway binding (just display), 2 ivalueconverters used. twoway databinding, have handled in code.


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -