Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6000653
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T00:43:28+00:00 2026-05-23T00:43:28+00:00

In WPF applications all the views are inherited from System.Windows.Window and have an associated

  • 0

In WPF applications all the views are inherited from System.Windows.Window and have an associated xaml and codebehind file. That seems logical.

However I’m confused that why does the App file, inherited from System.Windows.Application, have a xaml file? Although it is an application and not a view (It is not visible)? I know that this file is usually used to define application resources, etc, and xaml provides an efficient way of defining them. But that can also be done programatically. Then what benefit did the designers of wpf achieve by having both the xaml and code behind files for “App”? Wouldn’t one of them have been enough?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T00:43:29+00:00Added an answer on May 23, 2026 at 12:43 am

    However I’m confused that why does the App file, inherited from System.Windows.Application, have a xaml file? Although it is an application and not a view (It is not visible)?

    Remember that XAML is not a UI language, but a general declarative language. While it’s true that it’s mostly used to represent UI for WPF or SilverLigth, it’s also used to declare graph of objects in other non-UI technology.

    The first example that comes into my mind is the Workflow (the XOML is a derivate of the XAML), SharePoint also use XAML in some hidden parts, and I’ve seen in a customer project with use XAML as a meta-language for generating web-apps (and yes, it actually outputs HTML).

    Then, to answer to your question, the application have both files (and it is not actually a requirement) because you can :

    • declare some objects (in the xaml)
    • override the behavior of the application (by overriding appropriate methods)
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Assume I have several Views in my WPF application that all show a report,
I have a WPF windows application that uses the ms ribbon control for the
We have a WPF application that is loading a usercontrol at runtime from the
I have a desktop application developed in WPF that has several views displayed as
In a WPF MVVM application, you have view models that contain all the logic
we have a WPF application that uses CurrentPrincipal to handle security. This all works
In PDC sessions i see only Framework 4.0, Azure and WPF. My all applications
How can I organize multiple Composite WPF applications so that they share a single
Using the MVVM pattern creating WPF applications you have the ViewModel providing data to
Is the June 2009 WPF Toolkit safe to use in applications that will be

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.