c# - System.Windows.Data Error: 40 : BindingExpression path error: property not found on object -


many apologies add massive list of similar binding error questions out there, after hours of searching can't find solution work me!

i trying test viewmodel in wpf, icommand button code causing standard binding error:

system.windows.data error: 40 : bindingexpression path error: 'checkfornewhubs' property not found on 'object' ''hubmanagerviewmodel' (hashcode=13328197)'. bindingexpression:path=checkfornewhubs; dataitem='hubmanagerviewmodel' (hashcode=13328197); target element 'button' (name='checkfornewhubsbutton'); target property 'command' (type 'icommand')

my command (in hubmanagerviewmodel) is:

public icommand checkfornewhubs {         {         return new relaycommand(this.checkfornewhubsexecute, this.cansendhubmanagercommands);     }     set { } } 

and datacontext initiated in xaml grid as:

<grid.datacontext>     <viewmodels:hubmanagerviewmodel/> </grid.datacontext> 

i have tried explicitly setting datacontext of button this:

<button.datacontext>     <viewmodels:hubmanagerviewmodel/> </button.datacontext> 

can tell me i'm doing wrong? @ point i'm desperate new insight.

thanks time in advance!

you have used binding path checkfornewhubs should checkfornewhubs.


Comments

Popular posts from this blog

c++ - CryptStringToBinary API behavior -

c++ - Correct method for redrawing a layered window -

java.util.scanner - How to read and add only numbers to array from a text file -