The difference between CoreApplication / Application, CoreWindow / Window UWP applications

See a small partner asked on StackOverflowCoreApplication, CoreApplicationView, Application, ApplicationView, CoreWindow, Window Their meanings and the differences between them.

So I put together this article.


This post is written in multiple languages. Please select yours:

{% include post-version-selector.html %}

Address on StackOverflow:c# - CoreApplicationView vs CoreWindow vs ApplicationView - Stack Overflow

Namespaces

The full meaning of the classes often need to meet its namespace view, so we need several classes of these full name out of view:

  • Windows.ApplicationModel.Core.CoreApplication
  • Windows.ApplicationModel.Core.CoreApplicationView
  • Windows.UI.Xaml.Application
  • Windows.UI.ViewManagement.ApplicationView
  • Windows.UI.Core.CoreWindow
  • Windows.UI.Xaml.Window

Extra, if you care about the title bar, as well as:

  • Windows.ApplicationModel.Core.CoreApplicationViewTitleBar
  • Windows.UI.ViewManagement.ApplicationViewTitleBar

Then extra, if you care about the threading model, as well as:

  • Windows.UI.Core.CoreDispatcher
  • Windows.UI.Xaml.DispatcherTimer

We can see, a large namespace classificationWindows.ApplicationModel with Windows.UI Categories. In other words,CoreApplication with CoreApplicationView Management application model, andApplicationCoreWindow with Window Within management application UI. Small namespace classificationCore with Xaml Categories. In other words,CoreApplicationCoreApplicationView with CoreWindow It is the core management function, andApplication with Window Management of XAML UI.

top down

Application ToWindow To XAML, it is evident until it is able to top-down relationship, comprising the application window, the window comprising XAML content. Then the relationship between them?

CoreApplication A management view of all UWP applications (View), andCoreApplication The view is the direct managementCoreApplicationView; That is to say, UWP applicationsCoreApplication Managing all application viewsCoreApplicationView. And aCoreApplicationView Contains a window and a thread scheduling model, that is,CoreWindow with CoreDispatcher


▲ UWP application view

InLet UWP application displays multiple windows (multi-view) A paper, since a plurality of views corresponding to the application, it may be more easily understood relationship between them.

CoreWindow We understand that window. For ease of use,Windows.UI.XAML.Window Packaging of this typeCoreWindowCoreDispatcher Thread scheduling model is based on the message loop, it is because of the news cycle, so this window can always displayed without being destroyed.

External or internal?

We are standing on the perspective UWP ordinary developers to think about this problem, developers are from ordinary UWPMainPage UWP began to write applications. So here, "outside" means that out of the page, or called, those non-XAML XAML content than the content of our direct written; and refers to the "internal" within the page, that is, we usually write XAML content.

External part of aCoreApplicationCoreApplicationView with CoreWindow, Part of a pairApplication with Window. among them,Window is true CoreWindow The package offers more functions related to XAML. here ApplicationView Too, it isCoreApplication The package provides functions related to XAML.

Specifically,CoreWindow With the operating system, the type of application and the whole deal is provided a window such as size, location, status, input set or called;Window Is the type of application and UI within dealing, for example, you can set the UI displayed in the window, set the internal controls which part of the title bar to get inside this windowCompositor. Corresponding,CoreApplicationView Is the application interacts with the operating system, the type of window message loop mechanism working in cooperation, comprising a window region and a non-client area client settings;ApplicationView Type is also dealing with in-app UI, it can use XAML-related types of applications more convenient settings view.

To sum up,CoreWindow with CoreApplicationView Provide more core functions of the underlying operating system or application, andWindow with ApplicationView The former is encapsulated, it enables us to useWindows.UI.Xaml Namespace type in view of the application windows and controls.

More about the application of these concepts

I have some other articles used in these concepts:


Reference material


My blog will be starting inhttps://blog.walterlv.com/, And it will be released from CSDN which featured, but it is rarely updated once released.

If you see any do not understand the contents of the blog, please share. I builtdotnet Vocational and Technical College Welcome to join.

This workCreative Commons Attribution - NonCommercial - ShareAlike 4.0 International License AgreementFor licensing. Welcome to reprint, use, repost, but be sure to keep the article signed by Lu Yi (containing links:), It shall not be used for commercial purposes, based on works published after this article be sure to modify the same license. If you have any questions, pleaseContact me。

Intelligent Recommendation

The difference between $(window).width() and window.innerWidth

This article is reproduced fromhttp://www.webkaka.com/tutorial/js/2015/091615/ Recently, the website has been changed to adaptive, and some js and jquery programs need to be used. Due to the compatibi...

The difference between window and globalThis in javascript

Run in the browser, window is globalThis html code View the result in the browser: 2. The difference between globalThis and the specific object this. You can directly use this to point to the object i...

Is there a difference between the window opening function?

Is there a difference between the window opening function? Here is a quote: In order to facilitate the viewing, pictures and code quote bloggers tang_xuming, if there is offended, contact delete 1.Par...

Convert desktop applications to UWP applications through UWP Bridge and Visual Studio

The environment is Visual Studio 2017, and the Windows Universal Development Module has been installed. Official website (https://docs.microsoft.com/zh-cn/windows/uwp/porting/desktop-to-uwp-packaging-...

Speech recognition and synthesis in UWP applications

During the development of UWP, we may need to provide a variety of interaction methods, such as mouse, keyboard, touch, gamepad, etc. Of course, voice is also an important function. As we all know, ma...

More Recommendation

Interpretation of WIN10 UWP applications with Win32

1. Introduction to UWP UWP isWindows 10Abbreviation for Universal Windows Platform in. The Windows Universal Application Platform, inWindows 10 Mobile/Surface(Windows Tablet PC)/PC/Xbox/HoloLensRun on...

UWP - Application Development Mechanism

From the Microsoft Store to see the development of the technology used Ash pulls out a long time to eat Lumia 950 than that, the FIG. This is the Microsoft Store application on Windows Phone a develop...

uwp multimedia application

Work requirements Implementation MainPage.xaml MainPage.xaml.cs PositionSliderConverter.cs Reference link Resources and demo videos Work requirements Use MediaElement or MediaPlayer to create a player...

UWP-controls, application bar

Control properties, events and style resources How to add controls There are many ways to add controls. Which one do you prefer? 1) Use design tools such as Blend for Visual Studio or Microsoft Visual...

Button control in UWP application

Button control in UWP application Foreword: An unintentional self-written manuscript, very basic, the words are not lacking in childish, belonging to the basis of the foundation, and the editor is iss...

Copyright  DMCA © 2018-2026 - All Rights Reserved - www.programmersought.com  User Notice

Top