WPF properties not defined - settings 'not supported'
i presume this is because in .net7 settings was moved out of properties and into solution explorer, but i don't know how to refer to it now. Help ðŸ˜
14 Replies
What you have is correct but I suspect based on your error messages you did not add the properties namespace in your xaml.
At the top of the xaml document you will see things like this:
These are xaml namespaces, similar to using statements in C#. You need to add your properties namespace to this section like this:
just replace {yourproject} with whatever your projects namespace is.
You can find a working example of what this looks like here: https://github.com/AlexLexicon/Discord.Example.BindingSettings
GitHub
GitHub - AlexLexicon/Discord.Example.BindingSettings
Contribute to AlexLexicon/Discord.Example.BindingSettings development by creating an account on GitHub.
WPF doesn't default to it's applications accessing it's own properties by default? ....i swear i'm trying to like wpf....i swear i'm trying to like wpf....
@Alexicon Now i get the name "Setting" does not exist, but...eh?
in your binding try Settings with an 's' at the end?
Didn't work, although im pretty sure its supposed to be looking for ColorMode
i just included Setting (now Settings) there to test incase
what part did you change?
You changed the source to "properties:Settings.Default"
oh
I didn't realize i had done that as i tested various things
but still errors
i now realize i was missing an s on both of them
so that wasn't from testing...fuk
your still getting that most recent error?
oh
i just had to build
: )
I will ask for more help another time surely, also oh boy is getting human help so much faster then 5 hours of google when you don't know what your looking for in the depths of code terms being so specific
but
thank you!!!
(I will close this post in a bit, just leaving it open to make sure you read the thank you)
no problem