Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WinRT and WPF in Windows 8

As I understand, WinRT is a different version of WPF written without using the underlying Win32 APIs.

What's the relation of WinRT and WPF? Will WPF work under Metro in Windows 7 or will it launch the classic desktop?

That's not so clear from the Keynote. If someone has Windows 8 installed can confirm it's behaviour.

Thanks

like image 441
bstodos Avatar asked Oct 08 '11 14:10

bstodos


People also ask

What is WinRT used for?

C++/WinRT is an entirely standard modern C++17 language projection for Windows Runtime (WinRT) APIs, implemented as a header-file-based library, and designed to provide you with first-class access to the modern Windows API.

Can WPF run on Windows 7?

It is not yet done and there are a few things that will never be supported. But when this is production-ready, it is likely that the open source WPF will run on Windows 7 and thus benefit from any updates and fixes made to the code. From what I have learned here at Build, Microsoft's developer conference, it is that .

What is WPF and Silverlight?

WPF is a Windows desktop technology for developing Windows application in the . Net framework. Silverlight is a web technology, that is fully supported by a browser plugin on both Windows and MAC (in a similar fashion to Flash). There is also a plugin for running Silverlight on Linux (Moonlight).

Can I use UWP controls in WPF?

XAML Islands is a technology that allows you to host modern UWP controls in your WPF, Windows Forms, and Win32 applications. You can use for example UWP's InkCanvas or the MapControl, or you can use your custom UWP Controls. This allows you to modernize your apps with Windows 10 features.


2 Answers

WinRT is a replacement for the Winapi. The api is native, very unlike WPF that runs as a layer on top of the CLR. It certainly resembles WPF, part of what causes confusion. It adopted the metadata format of managed code, replacing type libraries of old. And uses XAML for UI designs, much like WPF, Silverlight and Windows Phone. You can still write WPF apps for Windows 8 but your app can't be published through the store, won't integrate with the Metro desktop nor will it run on tablets that are based on the ARM core. Whether that's a real problem depends a great deal on how well Metro will do in the market place.

like image 155
Hans Passant Avatar answered Sep 22 '22 22:09

Hans Passant


There is no relation between WPF and WinRT, just like there is no relation between Silverlight and WPF. Now we have three technologies, WPF, Silverlight and WinRT.

If you try to execute WPF application, it will not execute on Metro, it will execute in the classical desktop only.

In Visual Studio 2011, you have WPF and Metro as two different types of applications, and Xaml for WPF and WinRT is not same, Xaml for WinRT is pretty much same as that of Silverlight as lot of classes which exist for WPF are missing in WinRT library. But most of classes that exist for Silverlight are available in WinRT.

like image 45
Akash Kava Avatar answered Sep 21 '22 22:09

Akash Kava