I want to display the photos in the folder "Images" directly on a
Image object (In AdProject). But this folder is in another project in my solution(In AdWebApi).
Does anyone know how I can do this?

In the Microsoft documentation, it says that it can be done this way, but I did not realize that instead of "..." what should I put !
MyImage.Source = ImageSource.FromResource("AdWebApi.Images.filename.png", typeof(...)?.GetType().Assembly);
When I do not have access to the objects of that assembly from Xamrin Project, how can I get typeof(Object) ?
Rijwan AnsariPosted Mar 4, 2022, 9:57 AM
Muhammad Imran AnsariPosted Mar 2, 2022, 1:09 PM
Manikandan MPosted Mar 2, 2022, 4:20 AM
Hi There,
If your project namespace assembly is same for all sub project then, you can use that embedded image from local project otherwise we need to get the embedded image from server like below code.
[HttpGet]
public IActionResult Get() {
Byte[] b = System.IO.File.ReadAllBytes(@"E:\\Test.jpg"); // You can use your own method over here.
return File(b, "image/jpeg");
}
Shweta LodhaPosted Aug 12, 2021, 10:23 PM