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) ?

Shweta LodhaRank #31 · 39.8K reputationPosted Aug 12, 2021, 6:23 PM EDT
Manikandan MRank #731 · 3.2K reputationPosted Mar 1, 2022, 11:20 PM EST
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");
}
Muhammad Imran AnsariRank #326 · 7.6K reputationPosted Mar 2, 2022, 8:09 AM EST
Rijwan AnsariRank #82 · 24.2K reputationPosted Mar 4, 2022, 4:57 AM EST