Highlighted
Absent Member.
Absent Member.
1274 views

Set IMAGE Source manuel in WPF

Jump to solution

Hi!

I must set a Image like this in C#:

imageArtikel.Source = new BitmapImage(new Uri(Bild));

Have anyone done it before?

Best Regards

Bernd Riemke

0 Likes
1 Solution

Accepted Solutions
Highlighted
Micro Focus Expert
Micro Focus Expert

If you are looking for the COBOL syntax equivalent it would be:

  set imageArtike1::Source to new type BitmapImage(new type Uri(Bild))

Where Bild is a string containing the uri of the bitmap that you want to use.

View solution in original post

0 Likes
3 Replies
Highlighted
Micro Focus Expert
Micro Focus Expert

If you are looking for the COBOL syntax equivalent it would be:

  set imageArtike1::Source to new type BitmapImage(new type Uri(Bild))

Where Bild is a string containing the uri of the bitmap that you want to use.

View solution in original post

0 Likes
Highlighted
Absent Member.
Absent Member.

Thats it what I Need !

Best Regards

Bernd Riemke

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

In Visual COBOL, you don't actually need the "type" qualifier after the "new" operator - it's implicit.

So you can just use:

  set imageArtike1::Source to new BitmapImage(new Uri(Bild))

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.