CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2006
    Posts
    8

    Using DockPanel in VS2010??

    I'm trying to use this control in a .NET managed C++ application. I'm having trouble getting access to the System::Windows::Controls namespace.

    Any help is appreciated.

    Chuck

  2. #2
    Join Date
    Jun 2010
    Location
    Germany
    Posts
    2,675

    Re: Using DockPanel in VS2010??

    There actually is a System::Windows::Controls namespace and a DockPanel class inside it, but these are for WPF user interfaces and so I never actually came in contact with them (and needed to look them up). For Windows Forms applications, which is what's usually written in C++/CLI (IOW managed C++), you actually need the classes in the System::Windows::Forms namespace, and in there happens to be a class named Control from which all the Windows Forms control classes are derived.

    Looks like (1) your approach is wrong (or at least questionable) in the first place if you actually plan to use C++/CLI and (2) you need to explain your issue in more detail...
    Last edited by Eri523; August 6th, 2011 at 07:01 AM. Reason: Terminology fix and typo
    I was thrown out of college for cheating on the metaphysics exam; I looked into the soul of the boy sitting next to me.

    This is a snakeskin jacket! And for me it's a symbol of my individuality, and my belief... in personal freedom.

  3. #3
    Join Date
    Jan 2010
    Posts
    1,133

    Re: Using DockPanel in VS2010??

    Yeah, I don't think C++/CLI has the facilities (in terms of IDE support and such) to work with WPF - it's probably possible to do it, but it would be really cumbersome. If you want to work with WPF, C# is the natural choice.

    Anyway, the problem is (probably) that the references to the managed dlls containing the namespace an the classes are missing to work with WPF, you'll need:
    PresentationCore.dll
    PresentationFramework.dll

    and...
    WindowsBase.dll (I think)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured