none
What is System.Windows.Controls for? RRS feed

  • Question

  • I'm building a simple app using VisStudio 2008 and Windows Forms under .NET 3.5. When I search MSDN for information on controls that I use I find the info in the System.Windows.Forms namespace. But there is a parallel set of controls under System.Windows.Controls. E.g. there is a TextBox control under both of the namespaces. I found out (the hard way) that only the information under System.Windows.Forms applies to the controls I use. So what is System.Windows.Controls used for? The introductory remarks in that namespace are formal and don't say much. What's the difference between these two namespaces that have a lot of overlap but yet are different?

    Thanks.

    Saturday, December 18, 2010 5:36 AM

Answers

  • Hi Billy Gorton,

    Thank you for posting.

    The System.Windows.Forms namespace contains classes for creating Windows-based applications that take full advantage of the rich user interface features available in the Microsoft Windows operating system.

    System.Windows.Controls provides classes to create elements, known as controls, that enable a user to interact with an application. The control classes are at the core of the user's experience with any application because they allow a user to view, select, or enter data or other information.

    Best Regards,

    Larcolais


    Larcolais Gong[MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by Larcolais Gong Friday, December 24, 2010 5:49 AM
    Tuesday, December 21, 2010 7:55 AM

All replies

  • System.Windows.Forms is regular old WinForms using a code layout

    System.Windows.Controls is WPF and uses XAML

    Monday, December 20, 2010 6:58 PM
  • Hi Billy Gorton,

    Thank you for posting.

    The System.Windows.Forms namespace contains classes for creating Windows-based applications that take full advantage of the rich user interface features available in the Microsoft Windows operating system.

    System.Windows.Controls provides classes to create elements, known as controls, that enable a user to interact with an application. The control classes are at the core of the user's experience with any application because they allow a user to view, select, or enter data or other information.

    Best Regards,

    Larcolais


    Larcolais Gong[MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by Larcolais Gong Friday, December 24, 2010 5:49 AM
    Tuesday, December 21, 2010 7:55 AM