Cannot find governing FrameworkElement or FrameworkContentElement for target element
I'm trying to make something similar to the
UIElement
's InputBindings
, but for some reason, I'm getting this error in the debug output:
1 Reply
I read somewhere that this is due to there being no DataContext available for my custom input binding thing (called
CustomInputBindingThing
)
but even after making CustomInputBindingThing
extend FrameworkElement
, i stopped getting the error but the command still didn't bind
it works fine if i use the normal built in InputBindings though
even though the source code for the built in version and my own are basically the same; InputBindingCollection
inherits IList, and so does mine, and CustomInputBindingThing
extends Freezable
and ICommandSource
just like the original InputBinding
class. The only thing that seems to be missing though is something called InheritanceContext
, which is a dependency object
but it's internal so it might be that 😦