C
C#2y ago
br4kejet

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:
Cannot find governing FrameworkElement or FrameworkContentElement for target element. BindingExpression:Path=DoSomethingCommand; DataItem=null; target element is 'CustomInputBindingThing' (HashCode=53330552); target property is 'Command' (type 'ICommand')
Cannot find governing FrameworkElement or FrameworkContentElement for target element. BindingExpression:Path=DoSomethingCommand; DataItem=null; target element is 'CustomInputBindingThing' (HashCode=53330552); target property is 'Command' (type 'ICommand')
1 Reply
br4kejet
br4kejet2y ago
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 😦
Want results from more Discord servers?
Add your server
More Posts
When to use services [Answered]This might sounds like a weird question, is it worth using services in a small-ish non-server consolException vs LogicHello, im going to read a file with File.Readlines(). I read that its better to use logic(like a iMAUI - Weird footer and header when changing from NavigationPage to AppShellI want some kind of "Splash screen" that appears for 3 seconds and then redirect to MainPage (which Mapping outgoing enums to a specific shape in Asp.net Core [Answered]Hello! I'm trying to find a way to take **any **outgoing enums in DTOs from an ASP.NET Core API, anget minecraft versions list [Answered]hello! i wanted to make local minecraft server bootstrap, and i need to get versions list, to make uHow to use RedirectToAction(), RedirectToRoute() or Redirect() to specific endpoints on this Action?I'm unsure on how to correct format the redirect as if only specify the action name it will always dValidating an object not received during a request(FluentValidation) [Answered]Hi, I'm trying to achieve this: I receive Id and someRequest model from an endpoint(separate ID becaDependencies of dinamically loaded .dll are not found [Answered]Hi everyone, I've an ASP.NET Core 6 web app where I have a main project "A" that, if certain conditiIs there a way to make int [] and byte [] point to the same memory area? [Answered]1exception subclass for try-catch block [Answered]I want to subclass Exceptions to create a class that can be inserted into a catch() parameter to det