I have three Buttons (1.Male,2.Femal,3.OK),I want to change the CommandParameters
Property of Button(OK) by Click Male Button or FeMale Button. I found the question Setting a property with an EventTrigger is very helpful to me, but the TargetObject
of TargetedTriggerAction<FrameworkElement>
in void Invoke(object parameter){...}
function is always null
, WHY ?
HOW Can I to solve the Problem?
Error info in output window.
System.Windows.Data Error: 4 : Cannot find source for binding with reference 'ElementName=OKGenderButton'. BindingExpression:(no path); DataItem=null; target element is 'SetterAction' (HashCode=20203785); target property is 'TargetObject' (type 'Object')