locked
Media namespace not found RRS feed

  • Question

  • I am trying to use the Colors class which is part of System::Windows::Media namespcace but I get the following error :

    error C2039: 'Media' : is not a member of 'System::Windows'

    Any help ?

    Wednesday, June 6, 2012 8:53 AM

Answers

  • Are you sure you have a WPF application?

    Edit:

    Missed the ::

    Have you referenced the assembly containing Colors?  The help docs for the class lists the

    Inheritance Hierarchy

    Namespace

    Assembly

    The Assembly is what you need to reference to get access to the class.

    • Edited by JohnWein Wednesday, June 6, 2012 9:22 AM
    • Proposed as answer by Mike Feng Thursday, June 7, 2012 9:41 AM
    • Marked as answer by Mike Feng Monday, June 18, 2012 1:37 PM
    Wednesday, June 6, 2012 9:08 AM

All replies

  • Check target framework in VS

    Mark Answered, if it solves your question
    Rohit Arora

    Wednesday, June 6, 2012 8:55 AM
  • Are you sure you have a WPF application?

    Edit:

    Missed the ::

    Have you referenced the assembly containing Colors?  The help docs for the class lists the

    Inheritance Hierarchy

    Namespace

    Assembly

    The Assembly is what you need to reference to get access to the class.

    • Edited by JohnWein Wednesday, June 6, 2012 9:22 AM
    • Proposed as answer by Mike Feng Thursday, June 7, 2012 9:41 AM
    • Marked as answer by Mike Feng Monday, June 18, 2012 1:37 PM
    Wednesday, June 6, 2012 9:08 AM
  • I am using Visual C++ 2010 Express 

    Could you be more specific please ?

    Wednesday, June 6, 2012 9:10 AM
  • Check Project -> Project Properties -> Application ->Target Framework

    Mark Answered, if it solves your question
    Rohit Arora

    Wednesday, June 6, 2012 9:17 AM