On a WPF window I have an image object. I clicked the button to assign a source, the window for it popped up, I added the image in there (clicking add). When the image loaded in, instead of showing the image, it just showed a white box. I try to assign this white box as the image source, and it just says "property value is not valid." The solution explorer clearly shows that the images are there, and I can double click and open to edit them. So why isn't VS liking how I'm trying to assign images to my wpf image object? I've added images to WPF projects several times using this method.
Between the Property and End Property statements, write a Set Statement, followed by an End Set statement. In the Set statement, follow the Set keyword with a parameter list in parentheses. This parameter list must include at least a value parameter for the value passed by the calling code.
A property is a value or characteristic held by a Visual Basic object, such as Caption or Fore Color. Properties can be set at design time by using the Properties window or at run time by using statements in the program code. Object is the name of the object you're customizing.
In case other people read this, restarting the Visual Studio might help.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With