fluter
fluter

Reputation: 13846

What's the difference of Class library and windows runtime component for UWP

I'd like to create a custom charting control for my data, it will be used by uwp store apps, in Visual studio, there is class library project and there is also windows runtime component project, what's the different? which should I use? Also, user control or template control, which one should I use?

Upvotes: 13

Views: 4184

Answers (1)

Bart
Bart

Reputation: 10015

It all depends on what programming language you plan to use, how complex your control will be, if it will be only you using it on a single screen in a single project or other people might use your library and try to restyle the control.

In most of the cases you'll be picking a class library (if you're a C#/VB developer) and go for the templated control for maximum flexibility in styling (and better performance than a user control). This answer by Filip Skakun gives an excellent comparison between both types of controls.

If your custom charting control has to be used in UWP apps written in C++ or JavaScript (WinJS) or is written in C++, you'll have to use a Windows Runtime Component. A class library can only be used in .NET UWP apps. More info on Windows Runtime Component and how to create them is on MSDN.

Upvotes: 10

Related Questions