- Artikel
Windows UI Library (WinUI) 3 ist ein natives User Experience (UX)-Framework zum Erstellen moderner Windows-Apps. Es wird unabhängig vom Windows-Betriebssystem als Teil von ausgeliefertProjekttreffen(jetzt genanntWindows-App-SDK). Die Project Reunion 0.5-Version bietet Folgendes:Visual Studio-Projektvorlagenum Ihnen beim Erstellen von Apps mit einer WinUI 3-basierten Benutzeroberfläche zu helfen.
WinUI 3 – Project Reunion 0.5ist die erste stabile, unterstützte Version von WinUI 3, mit der Produktionsanwendungen erstellt werden können, die im Microsoft Store veröffentlicht werden können. Diese Version besteht aus Stabilitätsupdates und allgemeinen Verbesserungen, die es WinUI 3 ermöglichen, vorwärtskompatibel und produktionsbereit zu sein.
Notiz
Projekttreffenist der bisherige Codename für dieWindows-App-SDK. Diese Dokumentation wird weiterhin verwendetProjekttreffenwenn auf frühere Versionen Bezug genommen wird, die diesen Codenamen verwendet haben.
Installieren Sie WinUI 3 – Project Reunion 0.5
Diese neue Version von WinUI 3 ist als Teil von Project Reunion 0.5 verfügbar. Informationen zur Installation finden Sie unter:
Installieren Sie Tools für Vorschau- und Experimentalkanäle des Windows App SDK
Da WinUI nun als Teil von Project Reunion ausgeliefert wird, laden Sie zunächst die Project Reunion Visual Studio Extension (VSIX) herunter, die eine Reihe von Entwicklertools und -komponenten enthält. Weitere Informationen zum Project Reunion-Paket finden Sie unterStellen Sie Apps bereit, die das Windows App SDK verwenden. Das Windows App SDK VSIX beinhaltetWinUI 3-Vorlagen in Visual Studiodie Sie zum Erstellen Ihrer WinUI 3-App verwenden werden.
Notiz
Um WinUI 3-Steuerelemente und -Funktionen in Aktion zu sehen, können Sie die WinUI 3-Version klonen und erstellenGalerie der XAML-Steuerelementevon GitHub.
Sobald Sie Ihre Entwicklungsumgebung eingerichtet haben, lesen SieWinUI 3-Vorlagen in Visual Studioum sich mit den verfügbaren Visual Studio-Projekt- und Elementvorlagen vertraut zu machen.
Weitere Informationen zu den ersten Schritten beim Erstellen einer WinUI 3-App finden Sie in den folgenden Artikeln:
- Erstellen Sie Ihr erstes WinUI 3-Projekt
- Erstellen Sie eine C#-.NET-App mit WinUI 3 und Win32-Interop
Abgesehen von derEinschränkungen und bekannte ProblemeDas Erstellen einer App mithilfe der WinUI-Projekte ähnelt dem Erstellen einer UWP-App mit XAML und WinUI 2. Daher sind die meisten davonAnleitungsdokumentationfür UWP-Apps und dieWindows.UIEs gelten WinRT-Namespaces im Windows SDK.
Die Referenzdokumentation zur WinUI 3 API ist hier verfügbar:WinUI 3 API-Referenz
WebView2
Um WebView2 mit dieser WinUI 3-Version zu verwenden, laden Sie bitte den Evergreen Bootstrapper oder den Evergreen Standalone Installer herunter, den Sie unter findendiese Seitewenn Sie die WebView2 Runtime noch nicht installiert haben.
Windows Community Toolkit
Wenn Sie das Windows Community Toolkit verwenden,Laden Sie die neueste Version herunter.
Visual Studio-Unterstützung
Um die neuesten in WinUI 3 hinzugefügten Toolfunktionen wie Hot Reload, Live Visual Tree und Live Property Explorer nutzen zu können, müssen Sie eine Vorschauversion von Visual Studio 2019 16.10 verwenden. Bitte beachten Sie, dass es sich bei den Vorschauversionen von Visual Studio um Vorabversionen handelt. Daher kann es bei der Verwendung von Vorschauversionen von Visual Studio zum Erstellen von WinUI 3-Apps zu Fehlern und Einschränkungen kommen.
Die folgende Tabelle zeigt die Kompatibilität der Visual Studio 2019-Versionen mit WinUI 3 – Project Reunion 0.5.
VS-Version | WinUI 3 – Project Reunion 0.5 |
---|---|
16.8 | NEIN |
16.9 | Ja, aber ohne Hot Reload, Live Visual Tree oder Live Property Explorer |
16.10 Vorschauen | Ja, mit allen WinUI 3-Tools (in der Vorschau) |
Aktualisieren Sie Ihre vorhandene WinUI 3-App
Wenn Sie eine App mit einer früheren Vorschau- oder Release-Version von WinUI 3 erstellt haben, können Sie das Projekt aktualisieren, um die neueste Version von WinUI 3 – Project Reunion 0.5 – zu verwenden. Anweisungen finden Sie unterAktualisieren Sie vorhandene Projekte auf die neueste Version des Windows App SDK.
In dieser Version wurden wichtige Änderungen eingeführt
Stabile Eigenschaften
Diese Version bietet die Stabilität und Unterstützung, um WinUI 3 für Produktions-Apps geeignet zu machen, die an den Microsoft Store geliefert werden können. Es umfasst Unterstützung und Aufwärtskompatibilität für die meisten Funktionen, die in früheren Vorschauversionen eingeführt wurden:
- Möglichkeit, Desktop-Apps mit WinUI zu erstellen, einschließlich.NETZfür Win32-Apps
- RadialGradientBrush
- TabView-Updates
- Dunkle Theme-Updates
- Verbesserungen und Aktualisierungen anWebView2
- Unterstützung für hohe DPI
- Unterstützung für die Größenänderung und Verschiebung von Fenstern
- Aktualisiert, um auf eine neuere Version von Edge abzuzielen
- Es ist nicht mehr erforderlich, auf ein WebView2-spezifisches Nuget-Paket zu verweisen
- SwapChainPanel
- MRT-Kernunterstützung
- Dies macht Apps beim Start schneller und einfacher und ermöglicht eine schnellere Ressourcensuche.
- Arm64-Unterstützung
- Drag-and-Drop innerhalb und außerhalb von Apps
- RenderTargetBitmap (derzeit nur XAML-Inhalt – kein SwapChainPanel-Inhalt)
- Unterstützung für benutzerdefinierte Cursor
- Off-Thread-Eingabe
- Verbesserungen unserer Tool-/Entwicklererfahrung:
- Live Visual Tree, Hot Reload, Live Property Explorer und ähnliche Tools
- Intellisense für WinUI 3
- Für die Open-Source-Migration sind Verbesserungen erforderlich
- Benutzerdefinierte Titelleistenfunktionen: neuWindow.ExtendsContentIntoTitleBarUndWindow.SetTitleBarAPIs, die es Entwicklern ermöglichen, benutzerdefinierte Titelleisten in Desktop-Apps zu erstellen.
- VirtualSurfaceImageSource-Unterstützung
- In-App-Acryl
Vorschaufunktionen
Da es sich um eine stabile Version von WinUI 3 handelt, wurden die Vorschaufunktionen entfernt. Sie können weiterhin auf Vorschaufunktionen zugreifen, indem Sie die neueste Vorschauversion von WinUI 3 verwenden (sieheWindows-UI-Bibliothek 3 – Vorschau auf Project Reunion 0.8). Bitte beachten Sie, dass sich die folgenden wichtigen Funktionen noch in der Vorschau befinden und derzeit an ihrer Stabilisierung gearbeitet wird:
UWP-Unterstützung
- Das bedeutet, dass Sie mit WinUI 3 – Project Reunion 0.5 VSIX keine UWP-App erstellen oder ausführen können. Sie müssen das verwendenWinUI 3 – Project Reunion Preview VSIX, und befolgen Sie die restlichen Anweisungen inErstellen Sie Ihr erstes WinUI 3-Projekt. SehenÜbersicht und Versionshinweise: Windows UI Library 3 – Vorschau auf Project Reunion 0.8für mehr Informationen.
Unterstützung mehrerer Fenster in Desktop-Apps
Eingabevalidierung
Geben Sie Feedback und Vorschläge
Wir freuen uns über Ihr Feedback imWinUI GitHub-Repo.
Einschränkungen und bekannte Probleme
Die folgenden Punkte sind einige der bekannten Probleme mit WinUI 3 – Project Reunion 0.5. Wenn Sie ein Problem finden, das unten nicht aufgeführt ist, teilen Sie uns dies bitte mit, indem Sie zu einem bestehenden Problem beitragen oder über das ein neues Problem einreichenWinUI GitHub-Repo.
Plattform- und Betriebssystemunterstützung
WinUI 3 – Project Reunion 0.5 ist mit PCs kompatibel, auf denen das Windows 10-Update vom Oktober 2018 (Version 1809 – Build 17763) und neuer ausgeführt wird.
Entwicklerwerkzeuge
- Es werden nur C#- und C++/WinRT-Apps unterstützt
- Desktop-Apps unterstützen .NET 6 (und höher) und C# 9 und müssen in einer MSIX-App gepackt werden
- Keine XAML Designer-Unterstützung
- Neue C++/CX-Apps werden nicht unterstützt, Ihre vorhandenen Apps funktionieren jedoch weiterhin (bitte wechseln Sie so schnell wie möglich zu C++/WinRT).
- Die Bereitstellung eines unverpackten Desktops wird nicht unterstützt
- Stellen Sie beim Ausführen einer Desktop-App mit F5 sicher, dass Sie das Paketierungsprojekt ausführen. Durch Drücken von F5 im App-Projekt wird eine entpackte App ausgeführt, die WinUI 3 noch nicht unterstützt.
Fehlende Plattformfunktionen
Xbox-Unterstützung
HoloLens-Unterstützung
Fenster-Popups
- Genauer gesagt, die
ShouldConstrainToRootBounds
Die Eigenschaft verhält sich immer so, als ob sie auf festgelegt wäreWAHR
, unabhängig vom Immobilienwert.
- Genauer gesagt, die
Farbunterstützung, einschließlich:
- InkCanvas
- Handschriftansicht
- InkPresenter
Hintergrund Acryl
MediaElement und MediaPlayerElement
MapControl
SwapChainPanel unterstützt keine Transparenz
AcrylicBrush und andere Effekte, die einen CompositionBackdropBrush verwenden, können nicht von einem SwapChainPanel oder WebView2 abgetastet werden.
Global Reveal verwendet ein Fallback-Verhalten, einen festen Pinsel
XAML Islands wird in dieser Version nicht unterstützt
Die direkte Verwendung von WinUI 3 in einer vorhandenen Nicht-WinUI-Desktop-App unterliegt der folgenden Einschränkung: Der derzeit verfügbare Pfad zum Migrieren einer vorhandenen App besteht darin, eine hinzuzufügenneuWinUI 3-Projekt an Ihre Lösung anpassen und Ihre Logik nach Bedarf anpassen oder umgestalten.
Application.Suspending wird in Desktop-Apps nicht aufgerufen. Weitere Informationen finden Sie in der API-ReferenzdokumentationApplication.Suspending-Ereignisfür mehr Details.
CoreWindow, ApplicationView, CoreApplicationView, CoreDispatcher und ihre Abhängigkeiten werden in Desktop-Apps nicht unterstützt (siehe unten).
CoreWindow, ApplicationView, CoreApplicationView und CoreDispatcher in Desktop-Apps
Neu in WinUI 3 Preview 4 und künftig Standard:CoreWindow,Anwendungsansicht,CoreApplicationView CoreDispatcherund ihre Abhängigkeiten sind in Desktop-Apps nicht verfügbar. Zum Beispiel dieWindow.DispatcherEigentum ist immerNull, aber dieWindow.DispatcherQueueAlternativ kann das Grundstück genutzt werden.
Diese APIs funktionieren nur in UWP-Apps. In früheren Vorschauversionen funktionierten sie teilweise auch in Desktop-Apps, aber seit Vorschau 4 sind sie vollständig deaktiviert. Diese APIs sind für den UWP-Fall konzipiert, bei dem es nur ein Fenster pro Thread gibt und eine der Funktionen von WinUI 3 darin besteht, in Zukunft mehrere zu ermöglichen.
Es gibt APIs, die intern von der Existenz dieser APIs abhängen und daher in einer Desktop-App nicht unterstützt werden. Diese APIs sind im Allgemeinen statischGetForCurrentView
Methode. Zum BeispielUIViewSettings.GetForCurrentView.
Weitere Informationen zu betroffenen APIs sowie Workarounds und Ersetzungen für diese APIs finden Sie unterÄnderungen der WinRT-API für Desktop-Apps
Bekannte Probleme
DerUISettings.ColorValuesChanged-EreignisUndAccessibilitySettings.HighContrastChanged-Ereigniswerden in Desktop-Apps nicht mehr unterstützt. Dies kann zu Problemen führen, wenn Sie damit Änderungen in Windows-Designs erkennen.
Bisher mussten Sie zum Abrufen einer CompositionCapabilities-Instanz aufrufenCompositionCapabilites.GetForCurrentView(). Die von diesem Anruf zurückgegebenen Funktionen waren jedochnichtabhängig von der Ansicht. Um dies zu beheben und widerzuspiegeln, haben wir in dieser Version die statische GetForCurrentView()-Funktion gelöscht, sodass Sie jetzt eine erstellen könnenKompositionsfunktionendirekt widersprechen.
Aufgrund nicht übereinstimmender Versionen des .NET SDK und der winrt.runtime.dll erhalten Sie möglicherweise einen Build-Fehler. Um dieses Problem zu umgehen, können Sie Folgendes versuchen:
Stellen Sie Ihr .NET SDK explizit auf die richtige Version ein. Um die richtige Version für Ihre App zu ermitteln, suchen Sie nach
Tag in Ihrer Projektdatei. Verwenden Sie die Windows SDK-Build-Nummer, auf die Ihre App abzielt
Tag (z. B. 18362 oder 19041), fügen Sie das folgende Element zu Ihrer Projektdatei hinzu und speichern Sie dann Ihr Projekt:Beachten Sie, dass diese Problemumgehung für .NET SDK 5.0.203 und früher erforderlich ist, für .NET SDK 5.0.204 oder 5.0.300 jedoch nicht.
Bei Verwendung von Visual Studio 2019 16.10 Preview 2 kann Live Visual Tree zu einem Absturz führen. Um dies zu vermeiden, aktualisieren Sie auf die neueste VersionVisual Studio 2019 16.10 Vorschau.
WinUI 3-Steuerelementgalerie
Schauen Sie sich die WinUI 3 Controls Gallery (zuvor genannt) anXAML-Steuerelementgalerie – WinUI 3-Version) für eine Beispiel-App, die alle Steuerelemente und Funktionen enthält, die Teil von WinUI 3 – Project Reunion 0.5 sind.
Beispiel der WinUI 3 Controls Gallery-App
Sie können das Beispiel herunterladen, indem Sie das GitHub-Repo klonen. Klonen Sie dazu diewinui3Verzweigen Sie mit dem folgenden Befehl:
git clone --single-branch --branch winui3 https://github.com/microsoft/Xaml-Controls-Gallery.git
Stellen Sie nach dem Klonen sicher, dass Sie auf wechselnwinui3branch in Ihrer lokalen Git-Umgebung:
git checkout winui3
Siehe auch
- Windows-App-SDK
- Stabiler Release-Kanal für das Windows App SDK
- Beispiele für Windows App SDK
FAQs
Does Microsoft use WinUI? ›
WinUI 3 is the native UI platform component that ships with the Windows App SDK (completely decoupled from Windows SDKs). The Windows App SDK provides a unified set of APIs and tools that can be used to create production desktop apps that target Windows 10 and later, and can be published to the Microsoft Store.
What is the difference between WinUI and Windows applications? ›The Windows App SDK is the next evolution in the Windows app development platform. WinUI is the UI part of the Windows App SDK. It provides UI features for the Windows App SDK apps. When you create a Windows app SDK app, you have to use WinUI3 to create the UI layout.
Is WinUI production ready? ›WinUI 3 can be used to build production-ready desktop/Win32 Windows apps.
Does WinUI3 work on Windows 7? ›WinUI 3.0 will ship independently of Windows, allowing its features and capabilities to be used on in-market versions of Windows 10. As of today, with Uno Platform WinUI can also run on Windows 7, broadening its reach beyond UWP apps to traditional Win32 applications as well by utilizing WebAssembly.
Does WinUI 3 replace WPF? ›What is WinUI 3? Microsoft WinUI 3 is the latest UI toolkit from Microsoft. It aims to provide an alternative to the MFC, WinForms, and WPF technologies.
What is the difference between WinUI 2 and WinUI 3? ›WinUI 2 is compatible with UWP apps, and WinUI 3 works with any app supported by the Windows App SDK. WinUI 3 can be used directly as the UI layer for desktop apps, or starting next year, it can be used to modernize a Win32 app's UI gradually, using XAML Islands to mix and match with the following technologies: WPF.
Is WinUI the future? ›It calls WinUI the future of Windows development that offers "a state-of-the-art UI framework for all Windows apps across both Win32 and UWP", enabling developers to modernize apps written in MFC, Winforms, Silverlight, and WPF.
Is Universal Windows Platform deprecated? ›Microsoft continues to baby-step around the obvious, but it has officially deprecated the Universal Windows Platform (UWP) as it pushes the desktop-focused Windows App SDK (formerly called Project Reunion) and WinUI 3 as the future of Windows application development.
Is WPF still updated? ›Windows Presentation Foundation (WPF) end of life - Microsoft Q&A. This browser is no longer supported. Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Is Windows 7 Ultimate still working? ›The end-of-support date—Jan. 10, 2023—means Microsoft will no longer supply security patches or technical support to the operating system, leaving those still running the aging OS vulnerable to potential security threats. Also today, Microsoft is ending support for enterprise users on Windows 7.
Is Windows 7 now unsupported? ›
Support for Windows 7 has ended
After 10 years, security updates and technical support for Windows 7 ended on January 14, 2020.
This will ask you to choose to have your emulation mount within the host operating system (so Windows 10) or the guest OS (Windows 7). You'll need to click Player on the Workstation Player toolbar to enable Unity mode, which will allow you to run Windows 7 applications as though they were installed under Windows 10.
What is the difference between Windows API and WinRT? ›WinRT can be described as an API at the same level as Win32. The only difference with Win32 is that WinRT is exposed to all application developers.
What is the difference between Windows app and EXE? ›app. application is a manifest file containing details about the application to be deployed. Setup.exe is a setup launcher/bootstrapper provided by the framework. It reads manifest data in the clickonce source folder and effects the necessary changes on the clients machine to enable the app run.
What is the difference between WPF and Winform? ›WPF uses a more modern approach to layout that is based on XAML, while WinForms uses a more traditional approach that is based on forms and controls. This means that WPF provides more flexibility and control over the layout and appearance of the UI, while WinForms is simpler to use for basic UI design.
Is WPF a dead technology? ›WPF is alive since anyone can still download it and use it in app development for Windows.
Is WPF outdated? ›No it's not dead. We have a team working on WPF and supporting it. We now switch to the model where we accept a lot of PRs from the community because we think of WPF as very mature project so not that much rapid development is happening in WPF area, but we totally support it. We bring it to every new .
What will replace WPF? ›- Platform Uno.
- Avalonia.
- Blazor.
- Ooui.
WinUI 3 contains the entire UWP XAML codebase plus all WinUI 2's controls and styles.
What is the difference between WPF and WCF application? ›WCF = Windows Communication Foundation is used to build service-oriented applications. WPF = Windows Presentation Foundation is used to write platform-independent applications.
What is the difference between MFC and WPF? ›
MFC is for native C++ development, WPF is for managed code, primarily C# and VB. In theory you can do WPF in C++/CLI but the absence of a designer makes that pretty much a nonstarter.
What is replacing UWP? ›We will replace UWP with WinUI components in our v22. 1 release. UWP controls and demos will be removed from all distributions/installations. We will continue to provide support and minor updates to our UWP controls until December 2022.
Is Xamarin going away? ›Xamarin support will end on May 1, 2024 for all Xamarin SDKs.
Does Maui use WinUI 3? ›Use a rich set of WinUI 3 controls with the power of Blazor Hybrid. . NET MAUI and Blazor – Best of both modern technologies for Mobile, Desktop, and Web solutions from a single codebase.
Which windows will no longer be supported? ›Support for Windows 8.1 ended on January 10, 2023.
After that date, if you're running Microsoft 365, you'll no longer receive updates for the Office apps; this includes feature, security, and other quality updates.
Windows 10 will reach end of support on October 14, 2025. The current version, 22H2, will be the final version of Windows 10, and all editions will remain in support with monthly security update releases through that date.
What was the longest supported version of windows? ›Windows XP was the longest running Microsoft operating system, seeing three major updates and support up until April 2014 – 13 years from its original release date. Windows XP was still used on an estimated 430m PCs when it was discontinued.
Is WinForms dead? ›This begs the question – is WinForms dead? In fact, according to our research, a LOT of people ask search engines exactly that question. Now, in 2022, with increasing competition and the adoption of newer more modern technologies the popularity and usage of WinForms are at an all-time low.
Why is WPF so difficult? ›The difficulty with learning WPF is not so much the API as the model. It's a very different mental model than you'd use with something like Windows Forms. Rather than writing methods that imperatively populate a UI element, you generally data bind to properties on an object.
What operating system does Microsoft Windows use? ›Microsoft Windows, also called Windows and Windows OS, computer operating system (OS) developed by Microsoft Corporation to run personal computers (PCs).
What interface does Microsoft Windows use? ›
Microsoft Windows is a GUI (Graphical User Interface).
What user interface does Microsoft Windows use? ›Microsoft Windows versions use the GUI model of communication. GUI is the acronym for Graphical User Interface. Graphical User Interface refers to a user interface using mouse, icons, and windows.
What app store does Microsoft use? ›Microsoft Store is familiar on any device—you can search for free and paid apps like Adobe Reader, view their popularity and ratings, and download them to your device. When you install an app from Microsoft Store, it will follow you to any device.
What version of Windows does most people still have? ›Still, Windows 10 has proven to be the Windows 7 or its era, with the majority of PC users still running it over a year-and-a-half since the release of its successor.
What is the latest version of the Windows operating system? ›As of September 2022, the most recent version of Windows is Windows 11 for consumer PCs and tablets, Windows 11 Enterprise for corporations, and Windows Server 2022 for servers.
What is the difference between Microsoft and Windows? ›Microsoft Windows is the name of several families of computer software operating systems created by Microsoft. Microsoft first introduced an operating environment named Windows in November 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces (GUIs).
What is the difference between window and interface? ›A Window is the physical artifact or device that is used to instantiate a View for a user. A UI is the combination of Views and Windows and Controls which allows a user to see the data and to modify what material is presented in the Views and how that material is presented.
What is the purpose of the boot manager? ›The Windows Boot Manager is a Microsoft-provided UEFI application that sets up the boot environment. Inside the boot environment, individual boot applications started by the Boot Manager provide functionality for all customer-facing scenarios before the device boots.
What is the difference between UI and GUI? ›GUI is "graphical user interface" and UI is just "user interface." GUI is a subset of UI. UI can include non-graphical interfaces such as screen readers or command line interfaces which aren't considered GUI. Also, the opposite of GUI is CLI - Command Line Interface.
What is the most common computer user interface? ›GUI is one of the most popular and simple interfaces. By pointing and clicking on images or icons with a mouse, touchpad, touchscreen device, or other devices, you can interact with these interfaces. Because they employ Windows, Icons, Menus, and Pointers, GUIs are also referred to as WIMP interfaces.
What are default user interface used in windows Server? ›
Developer | Microsoft |
---|---|
Update method | Windows Update Windows Server Update Services Configuration Manager Docker Hub Intune |
Default user interface | Windows shell PowerShell Windows Admin Center |
License | Trialware, SaaS, or volume licensing |
Official website | www.microsoft.com/en-us/windows-server |
Answer: the four features of A Graphical User Interface (GUI) are constituted of four main parts – Windows, Icons, Menus and Pointer. They are also the Main Components of the Interface, also known as the WIMP system.