I need some quick help which is a road blocker for me now. I have Button
in ItemsControl
and I need to perform some task on Button click. I tried addin
Just a guess. Is CommandDetailsButtonClick
defined in a ViewModel, which is DataContext
of your UserControl (the one with ListStpRules property)?
DataContext
of button in ItemTemplate
is an item from ListStpRules
, and if you command is not there then binding won't find it.
You can check diagnostic messages from wpf in Output window while debugging your application. It writes there if it can not resolve binding.