Questions tagged [windows-runtime]

Windows Runtime (WinRT) is a Microsoft platform architecture that allows applications to run in a sandboxed environment exposing a 'Windows Modern Style' UI/UX. Not to be confused with Windows RT, the edition of Windows 8 for ARM devices; see windows-rt.

Windows Runtime (WinRT) is a Microsoft platform architecture that allows applications to run in a sandboxed environment exposing a Windows Modern Style UI/UX (previously known by it's codename 'Metro', see )

WinRT is the set of APIs, specifications and architecture that enable and create a sandbox to allow and simplify access to the operating system and the underlying hardware. Applications designed for WinRT run in the sandbox.

WinRT architecture define a set of language binding interfaces called projections, Microsoft delivered the first version of WinRT with projections for following languages:

  • C#/XAML
  • VB/XAML
  • HTML/JavaScript
  • C++/CX

But in practice anyone who follows WinRT exposed interface restrictions and rules can create a projection to support any set of languages.

Useful links:

Windows Runtime

WinRT demystified

Anything about WinRT

Windows Runtime Library

NB Not to be confused with Windows RT, the edition of Windows 8 for ARM devices; see .

NB The Windows Runtime as a term is not used much anymore in relation to Windows 10 and the evolved platform has instead been called Universal Windows Platform (UWP). See . WinRT has been used in relation to the platform in Windows 8 and 8.1.

8697 questions
813
votes
26 answers

Setting Authorization Header of HttpClient

I have an HttpClient that I am using for a REST API. However I am having trouble setting up the Authorization header. I need to set the header to the token I received from doing my OAuth request. I saw some code for .NET that suggests the…
Stephen Hynes
  • 22,071
  • 6
  • 18
  • 20
360
votes
5 answers

How does Windows 8 Runtime (WinRT / Windows Store apps / Windows 10 Universal App) compare to Silverlight and WPF?

I am trying to get my head round the new Windows 8 Runtime that is used to create Metro style apps. I know you can use it with XAML and it is based on .NET so C# and VB.NET can be used to write the apps, but then it seems to have something to do…
271
votes
6 answers

Adding headers when using httpClient.GetAsync

I'm implementing an API made by other colleagues with Apiary.io, in a Windows Store app project. They show this example of a method I have to implement: var baseAddress = new Uri("https://private-a8014-xxxxxx.apiary-mock.com/"); using (var…
Thought
  • 5,326
  • 7
  • 33
  • 69
194
votes
13 answers

Allowing Untrusted SSL Certificates with HttpClient

I'm struggling to get my Windows 8 application to communicate with my test web API over SSL. It seems that HttpClient/HttpClientHandler does not provide and option to ignore untrusted certificates like WebRequest enables you to (albeit in a "hacky"…
Jamie
  • 4,670
  • 5
  • 35
  • 49
166
votes
2 answers

Why is WinRT unmanaged?

Windows 8 introduces WinRT, which is like .NET but unmanaged. Why is it unmanaged? Is it a performance issue? Does it mean garbage collection is not suitable for lower level APIs?
user380719
  • 9,663
  • 15
  • 54
  • 89
146
votes
3 answers

Convert a List into an ObservableCollection

I have a List which is being populated from JSON. I need to convert it into an ObservableCollection to bind it to my GridView. Any suggestions?
raghu_3
  • 1,849
  • 3
  • 18
  • 29
121
votes
8 answers

How can a Metro app in Windows 8 communicate with a backend desktop app on the same machine?

In a situation where you have the UI frontend built using the new Metro style of apps for windows 8, and would like it to communicate with a .NET application running on the desktop on the same local machine (e.g. a windows service app). What forms…
dodgy_coder
  • 12,407
  • 10
  • 54
  • 67
97
votes
9 answers

Windows GUI: WPF or WinRT (2015+)

I am trying to get an overview of the different technologies, to use when building GUI's in the Windows World. For context, I am building a little 2d platform multiplayer game. (Just for learning purpose..) My teacher says that he think that WPF is…
Alf Nielsen
  • 1,361
  • 1
  • 10
  • 19
87
votes
3 answers
85
votes
5 answers

Correct way to get the CoreDispatcher in a Windows Store app

I'm building a Windows Store app, and I have some code that needs to be posted to the UI thread. For that, i'd like to retrieve the CoreDispatcher and use it to post the code. It seems that there are a few ways to do so: // First…
lysergic-acid
  • 19,570
  • 21
  • 109
  • 218
68
votes
2 answers

How to await an async private method invoked using reflection in WinRT?

I'm writing unit tests for a WinRT app, and I am able to invoke non-async private methods using this: TheObjectClass theObject = new TheObjectClass(); Type objType = typeof(TheObjectClass); objType.GetTypeInfo() …
jokeefe
  • 1,836
  • 4
  • 22
  • 27
67
votes
6 answers

Run code on UI thread in WinRT

How can I run code on the UI thread in WinRT (Windows 8 Metro)? The Invoke method does not exist.
ofer
  • 721
  • 1
  • 8
  • 7
63
votes
15 answers

How to uninstall an app that another user installed?

I keep hitting this problem when I try to debug my Windows 8 apps and there is a copy already installed on another user account: DEP0700 : Registration of the app failed. Another user has already installed a packaged version of this app. An…
60
votes
4 answers

How to solve the error "Must use PackageReference"?

After adding WindowsRuntime to a WinForms-project, building the project fails with Error "Must use PackageReference". The build log is more precise: C:[...]\Visual Studio…
Joe
  • 741
  • 1
  • 5
  • 6
57
votes
11 answers

Progress bar with HttpClient

i have a file downloader function: HttpClientHandler aHandler = new HttpClientHandler(); aHandler.ClientCertificateOptions = ClientCertificateOption.Automatic; HttpClient aClient = new HttpClient(aHandler); …
Developer
  • 4,158
  • 5
  • 34
  • 66
1
2 3
99 100