How works resources in WPF?

Posted on 2010-01-01
Last Modified: 2013-11-13

  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
Question by:MarcoCastro
    LVL 5

    Accepted Solution

    try this

    using(Stream stream = Application.GetResourceStream(new Uri("/Shutdown.ico")).Stream)
        this.notifyIcon.Icon = new SystemDrawing.Icon(stream);

    Author Closing Comment

    There was no answer to me question.

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    Join & Write a Comment

    3 Tips For Quarter Milers: A Sprinter's Understanding of Agile Software Development Two years ago, I wrote a blog entry about Agile software development ( At th…
    Online collaboration can help businesses be more efficient, help employees grow their skills and foster a team environment.
    This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA.…
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now