Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Property value is not valid." Why is visual studio not letting me assign a picture to an image?

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.

like image 711
cost Avatar asked Mar 07 '12 21:03

cost


People also ask

How do I set properties in Visual Studio?

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.

How do you create a property in Visual Basic?

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.


1 Answers

In case other people read this, restarting the Visual Studio might help.

like image 102
Bizhan Avatar answered Sep 27 '22 23:09

Bizhan