I have this code where the user clicks on a List Box Item and I try to get the Content property of TemplatedParent assigned into a variable to check later, but I get this error:
How can I assign the content value to a variable?
CodePudding user response:
You have to pass a DependencyProperty to GetValue
so replace Content with ContentControl.ContentProperty