• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 302
  • Last Modified:

How works resources in WPF?


  I'm starting to understand WPF but the documentation is very disperso. Could some guru explain me the difference of a Canvas and DrawingBrush? I'm doing this questiong because MS Expression Desgin generates this two kind of data.

  With DrawingBrush I can create resources and import them to the application. Otherwise I can't incluse a StoryBoard in the object. With Canvas the situation is the oposite. Is there a way to create a resource object with animation or other kind of things?

  When creating Shadow, per example, DrawBrusuh generates a PNG pictures to be used with the object. Canvas uses XAML data to create the same kind if shadow. Why does it happens?

  What is the better option to create icons to be used in an application?

  Marco Castro
1 Solution
try this

using(Stream stream = Application.GetResourceStream(new Uri("/Shutdown.ico")).Stream)
    this.notifyIcon.Icon = new SystemDrawing.Icon(stream);
MarcoCastroAuthor Commented:
There was no answer to me question.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now