Questions tagged [winrt-component]

Windows Runtime Component and WinRT Component Libraries are concepts related to language runtime interoperability in Windows Runtime - the modern development platform for Windows and typically used in Windows Store applications. Use this tag to denote any questions related to creating WinRT Components, WinRT Component Libraries and typically to limitations imposed by the rules of creating WinRT Components.

From Wikipedia:

Classes that are compiled to target the WinRT are called WinRT components. They are classes that can be written in any supported language and for any supported platform. The key is the metadata. This metadata makes it possible to interface with the component from any other WinRT language. The runtime requires WinRT components that are built with .NET Framework to use the defined interface types or .NET type interfaces, which automatically map to the first named. Inheritance is as yet not supported in managed WinRT components, except for XAML classes.

Windows Runtime applications can be written using any combinations of the three major runtimes - native, .NET and JS as long as these components are exposed across ABI (application binary interface) following rules such as - public classes need to be sealed, method arguments and return types need to be WinRT types themselves or have direct projection to those (such as Windows.Foundation.Uri with System.Uri or Platform::String and System.String or many of the other basic types having counterparts in different language runtimes).

114 questions
0
votes
1 answer

Pre-Installed Configuration Task for UWP App not runing

for a LOB App written as a Windows Universal App, I want to register a Background Task when the app is installed without the need to start it. From what I can see, the documentation points me to the Pre-Installed Configuration capability in the…
0
votes
0 answers

How to call TagLib in Windows Runtime Component C++

So I am using TagLib in WinRT Component and trying to get Album arts of mp3 files and then save them to separate files. So far I am using this code: auto albumartFolder = ApplicationData::Current->LocalFolder; StorageFile^…
thecodrr
  • 265
  • 1
  • 2
  • 13
0
votes
0 answers

Load an Extension (.dll) in UWP with Full Trust?

It is possible to load a whole process in Full Trust mode in a WinRT application adding this to its AppManifest: While it works and I could potentially…
Anzurio
  • 16,780
  • 3
  • 39
  • 49
0
votes
2 answers

Call WebView page method from referenced WinRT Component with AllowForWeb class

I have a XAML page with WebView inside (for example MainPage.xaml). Also I have WinRT Component with class marked with [AllowForWeb] attribute. This component is referenced from project where MainPage.xaml located and in code-behind…
0
votes
0 answers

TypeLoadException using WinRT Brokered Component

I am building a Windows Store App using a brokered component. The brokered component is meant to enable interaction with an RFID reader on the device. When I try to initialize an instance of the class exposed by the brokered component, I received a…
0
votes
1 answer

Brokered UWP Component Project Templates and Async

I am playing with Brokered UWP Component Project Templates (https://visualstudiogallery.msdn.microsoft.com/d2e9cac0-66a8-464a-a902-55ae765c8e6e), and testing if I can call asynchronous method from the brokered component. So I replaced…
Markal
  • 1
  • 3
0
votes
1 answer

How to pass custom WinRT types in methods from c# to c++ Windows Runtime Components?

I'm trying to pass a simple C++ class, created in C#, trough a method to my c++ WinRT component, but I can't figure out how to do that and if its even possible. I created this custom class in c++ (from…
Toine db
  • 709
  • 7
  • 25
0
votes
1 answer

windows store app always crash in other remote devices

I am developing a windows store app, it works perfect in my own pc by local machine mode, and it works in my co-work's pc by remote marchine too. However, it doesn't work in other people's pc. it's always thrown an exception…
PatrickSCLin
  • 1,419
  • 3
  • 17
  • 45
0
votes
1 answer

How to call internal method from ref class in another C++/CX WinRT component?

Is there a way to call internal method with native parameter from ref class in another C++/CX WinRT component? I know there is solution via pointers exposed as int, but is there any better way? Something like to include header files from other lib…
wallycz
  • 312
  • 3
  • 11
0
votes
1 answer

WinRt WebView control. Reuse same instance

my windows universal application is a list detail implementation. Inside the detail page i have a WebView control that is initialized with an URI. This URI is the same for each detail item because i pass to the page details data with InvokeScript…
Gianpolo
  • 966
  • 8
  • 19
0
votes
1 answer

Cannot find Windows.Devices.Sensors on server machine

I have a C# desktop application using WinRT API, i.e. Windows.Sensors.Devices.Compass. The application can be built locally on a Windows 10 machine but it cannot be built on our build server which has Windows Server 2008 R2 installed. I can see the…
xtu
  • 417
  • 3
  • 12
0
votes
2 answers

Null static value from class inside WinRT background task

I'm trying to save configuration(json string) passed from WinJs and read this configuration inside backgroundTask. I'm declaring static variable so I can read values from background Task but it returns null. Class to store configuration: public…
mehul9595
  • 1,925
  • 7
  • 32
  • 55
0
votes
2 answers

How to convert Bstr to Platform::String?

Now I am doing a Windows Metro App job, and I am developing a C++ component to get the input method's candidate List. An issue occurs at the last step to output the result list. I can get each member of the candidate list, but the type is the…
CzeRen
  • 11
  • 4
0
votes
1 answer

AppBarButton theme in Windows Phone 8.1

I've tried to override default themes for AppBarItem and Keyboard, but still accent colors for application bar items remain default, resources that I've used are listed below. Is it possible to change in code the background of AppBarItem and the…
Dmitry Dyachkov
  • 1,715
  • 2
  • 19
  • 46
0
votes
1 answer

Convert Ellipse or EllipseGeometry to PathFigure on Windows Phone 8.1

I've stumbled upon converting Ellipse to PathGeometry. I've tried to use ArcSegment to present Ellipse, but still don't know how to convert Ellipse size to ArcSegment size. I'm trying to segment Ellipse into two part, but there are other approaches,…
Dmitry Dyachkov
  • 1,715
  • 2
  • 19
  • 46