none
how create new WPF application without XAML RRS feed

  • Question

  • When I create a new WPF application in VS2008 the wizard creates XAML files.  I find the XAML based project combersome to use because there are hidden code files that I cant readily see. Also, I don't think I want to use XAML - too verbose.

    Granted, I am just learning WPF from the Petzold book. All the examples in his book in the early chapters don't use XAML.  How can I create a Visual Studio project that contains all the necessary WPF references without getting the full blown XAML version of the project that VS2008 creates?

    thanks,
    Tuesday, October 20, 2009 4:22 PM

Answers

  • Hi Steve,

    If you want a WPF app without XAML, simply create a WPF Application project and then delete the App.xaml and Window1.xaml files in Solution Explorer.  That leaves a project with the requisite WPF assembly references. For an example of coding a WPF app sans XAML, check this page out.

    FYI, here's a blog post that discusses the pros and cons of WPF programming with XAML that you might find interesting.

    HTH,
    - Kemp Brown [MSFT]
    • Proposed as answer by Kemp Brown Wednesday, October 21, 2009 1:23 AM
    • Marked as answer by Steve Richter Wednesday, October 21, 2009 2:28 PM
    Wednesday, October 21, 2009 1:23 AM