Binding the Enabled property of a Android button with the MvvmCross

后端 未结 1 689
时光取名叫无心
时光取名叫无心 2021-01-18 11:16

I have a problem when I try to bind the \"Enabled\" property of my Android Button to a Boolean of my ViewModel using the MvvmCross framework and I really don\'t know the ori

相关标签:
1条回答
  • 2021-01-18 11:45

    I think what you are seeing here is some interaction between ICommand.CanExecute and the Enabled property. There's a discussion about this on https://github.com/MvvmCross/MvvmCross/issues/729

    To work around this, try switching the binding to:

    local:MvxBind="Click ShowProjectPicturesCommand;Enabled HasPicture"
    

    (Also note that the separator in bindings is a ; - not a ,)

    0 讨论(0)
提交回复
热议问题