I have a library to which I have added images. I want to get these images in order to display them in the WPF Image(System.Windows.Control.Image). I have used several methods.
<Image Source=/MyLibrary;Component/Resource/image.png"/>
With this method, I get the following error: Failed to upload a file or assembly MyLibrary If I use
<Image Source="pack://application:,,,/Resource/image.png"
Then I get an image that is displayed in the UserControl, but not on the form. The structure of the project is as follows: The project contains several libraries. 2 of them are not used and I use only 3. In the third library I have a Resource folder with images in it. Also in this library is the WindowsForm project to which I add my UserControl in which I use WPF and all the methods for working are written in it. This library is a plugin. In it, through a third-party application for which a plugin is being written, I launch a Form in which UserControl.
How to request an image from project resources in xaml. Images have been added to the resources of the project itself.
I tried to add images via C# code when initializing the project. But I can't assign the value of system.drawing.bitmap to a variable of type system.windows.controls.image
This is my first appeal, so it may be a bad word. I really hope for a solution. Thank you in advance for reading the problem.