Problem passing string argument to MVVM LIght RelayCommand<T> -


i have defined command this: switchthemecommand = new relaycommand((t) => lookandfeelhelper.switchtheme(t));

where string name of theme want switch to, selected button click on listbox. listbox button have theme name afaict. problem when relaycommand bound button command, instead of seeing method lookandfeelhelper.switchtheme(t) int debugger, see following: - execute {method = {void b_b(system.string)}} system.action

i expected see real method being invoked. relaycommand no arguments, expected method name there in _execute.

i have taken away 'canexecute' example.

any ideas?

probably typo in question believe command definition should

switchthemecommand<string> = new relaycommand((t) => lookandfeelhelper.switchtheme(t)); 

other that, not see wrong provided, make sure lookandfeelhelper.switchtheme(string theme) working correctly.


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -