Image in WPF menu with C#

Asked

Viewed 220 times

2

I have a problem, I created an application in WPF, and put a menu that will have images in the items. When I preview the image in VS is ok, but when I run the application the images do not appear. At source it’s like this?

<Image Source="Image/minhaimagem.png" />

Is there any configuration that should be done? or something like that?

From now on I thank you all.

1 answer

0


The solution is very simple:

<Image Source="pack://application:,,,/**Coloque.Aqui.O.Namespace**;Component/Image/minhaimagem.png" />
  • You can use the answer better?

  • Sergio in this link is well explained.

  • The idea of Stack Overflow in Portuguese is to have enough information in the answers for the author of the question (AP) to better understand the problem and the answer. If this link crashes one day the respost gets poor. Can you [Edit] the answer and add info from that link? tell me when you do and I’ll give +1 :)

Browser other questions tagged

You are not signed in. Login or sign up in order to post.