You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When creating a library, there does not appear to be a way to automagically import the required styles and templates.
API Changes
Not sure what the best way to do this as I can't think of all possible issues this may cause, however if we follow the UWP and WPF pattern, they have a special path in the library: Themes\Generic.xaml which is automatically imported. There are also a few other theme names, but they seem to be for specific styles of Windows.
Summary
When creating a library, there does not appear to be a way to automagically import the required styles and templates.
API Changes
Not sure what the best way to do this as I can't think of all possible issues this may cause, however if we follow the UWP and WPF pattern, they have a special path in the library:
Themes\Generic.xaml
which is automatically imported. There are also a few other theme names, but they seem to be for specific styles of Windows.See more: https://docs.microsoft.com/en-us/dotnet/framework/wpf/controls/control-authoring-overview
Intended Use Case
My particular use case is that I want to create a templated control and include a default set of styles for this new control in the library.
Current Implementations
There are currently 2 ways to get the same sort of operation now.
User
The first is on the user to import the dictionary in
App.xaml
:This is "nice" but everyone will forget to do it.
Library
The other way which is "automatic" is done via the control constructor:
This is good in most cases, but obviously is not the greatest thing. The framework should do this all for me.
The text was updated successfully, but these errors were encountered: