PictureBox.ImageLocation Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets the path or URL for the image to display in the PictureBox.
public:
property System::String ^ ImageLocation { System::String ^ get(); void set(System::String ^ value); };
public string ImageLocation { get; set; }
public string? ImageLocation { get; set; }
member this.ImageLocation : string with get, set
Public Property ImageLocation As String
Property Value
The path or URL for the image to display in the PictureBox.
Remarks
The property value can be an actual path (for example, "C:\SomeFolder\SomeSubFolder\Picture.jpg"), a relative path ("\SomeSubFolder\Picture.jpg"), or a URL (http://contoso.com/images/Picture.jpg
).
If a relative path is used, it will be considered relative to the working directory.
A call to the Load method will overwrite the ImageLocation property, setting ImageLocation to the URL value specified in the method call.
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for