Ellen Joe.♡
✅ How to get data out of a custom control?
Currently, I'm doing a custom user control for a password box with a label showcasing what to put in there.
Right now, this is the content of my user control:
And this is the .cs file:
But as soon as I use it somewhere to display something, I get this error:
System.Windows.Markup.XamlParseException: A 'Binding' cannot be set on the 'Password' property of type 'PasswordBox'. A 'Binding' can only be set on a DependencyProperty of a DependencyObject.
How can I fix it? I need to get the password out of the password box from my user control, but since I cannot use a property apparently, I don't know another way to do it.100 replies
Cannot find method although defined and used?
I'm currently creating a WPF project and have this static class:
And I use it in my ViewModel like this:
But I get the error:
Cannot resolve symbol 'CheckConfigFile'
It should find it tho cuz my VM has a dependency on it. Does anyone see the error?
3 replies