简体   繁体   中英

Right way to create a custom control library in winui

i want to create a custom control library with winui 3/uwp.

The question is How should I introduce dictionaries and styles?

Why did PowerToys put some dictionaries in the generic file ? And put some other dictionaries in the app.xaml file?

I also noticed that one of the dictionaries (IsEnabledTextBlock) was placed in both the generic file and the app.xaml file. why?

If we want to create a custom control library, how should we introduce these dictionaries and styles?

If you are developing a library that contains custom controls, the default styles of these controls should be defined in a resource dictionary called themes/generic.xaml . This is where the framework will look for them by convention.

A class library has no concept of an app global App.xaml file since it's not an app.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM