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
{{ message }}
Repository navigation
Need to embed wpf loose theme files into their theme assemblies #865
For the XAML tooling experience for WPF NetCore needs to be decoupled from .Net Framework. The themes loose file will need to be embeded into their theme assemblies so that XAML Designer can extract theme when creating a copy of a template.
Below is the table of the loose file to be included into their respective theme assemblies
Old framework had design time companion DLLs to distribute design time only customization and content, mostly in WinForms but WPF also supported this. If design time assemblies are still going to be a thing in .NET Core it may be worth to put these resources in there instead of the runtime assemblies?
It probably doesn't make much difference in term of deployment size, but may be worth for separation of concerns to keep designer specific resources in the design time assembly. Also may be worth to take a moment and think about whether it's worth to standardize/document how this works and allow 3rd party controls/themes to do the same.
@vatsan-madhavan the DLLs you can put in a Design subfolder, usually with a .Design.dll suffix, which get picked up by the designer to provide design-time behavior/resources.
I've been thinking about this a bit and chatted with winforms folks about it as well.
It looks like the *.design.dll assemblies are being consumed as if they are runtime assemblies by many applications. In effect, they are both design timeandruntime assemblies, and any real benefits of compartmentalizing design-time only assemblies form runtime assemblies seems to be lost in many real scenarios. (BTW, System.Drawing.Design.dll is a facade in .NET Core that redirects to System.Windows.Forms.Design.Editors.dll)
WPF's theme assemblies are already a lot like design time assemblies. Their payload (resources - namely BAML, as well as types under Microsoft.Windows.Themes) all about providing theming constructs, and they are already consumed at design-time occasionally (to peek into the respective BAML, for e.g.).
The general principle of design-time assembly is appealing, but in this specific instance the distinction between PresentationFramework.Aero2.dll and (a hypothetical) PresentationFramework.Aero2.Design.dll seems rather slim. Even if we were to invent PresentationFramework.Aero2.Design.dll and embed these XAML files as resource in them, design-time tools will likely to continue to load PresentatitonFramework.Aero2.dll to read the BAML, negating the separation of concerns design goal.
And finally, at this stage in the 3.0 (getting close to RC!), we don't want to add a new construct (namely, design-time assemblies) to WPF.
We will revisit this in .NET 5, when we look into a better approach to delivering these same XAML resources to interested consumers (notably VS).
Reacted by Tobias Käs, Jan Kučera and Thomas Claudius Huber
Activity
vatsan-madhavan commentedon Jun 4, 2019
This is something we have agreed with the VS team to deliver in Preview 8.
weltkante commentedon Jun 5, 2019
Old framework had design time companion DLLs to distribute design time only customization and content, mostly in WinForms but WPF also supported this. If design time assemblies are still going to be a thing in .NET Core it may be worth to put these resources in there instead of the runtime assemblies?
It probably doesn't make much difference in term of deployment size, but may be worth for separation of concerns to keep designer specific resources in the design time assembly. Also may be worth to take a moment and think about whether it's worth to standardize/document how this works and allow 3rd party controls/themes to do the same.
vatsan-madhavan commentedon Jun 5, 2019
Which DLLs are you referring to?
weltkante commentedon Jun 5, 2019
@vatsan-madhavan the DLLs you can put in a
Designsubfolder, usually with a.Design.dllsuffix, which get picked up by the designer to provide design-time behavior/resources.vatsan-madhavan commentedon Jun 7, 2019
I've been thinking about this a bit and chatted with winforms folks about it as well.
It looks like the
*.design.dllassemblies are being consumed as if they are runtime assemblies by many applications. In effect, they are both design time and runtime assemblies, and any real benefits of compartmentalizing design-time only assemblies form runtime assemblies seems to be lost in many real scenarios. (BTW,System.Drawing.Design.dllis a facade in .NET Core that redirects toSystem.Windows.Forms.Design.Editors.dll)WPF's theme assemblies are already a lot like design time assemblies. Their payload (resources - namely BAML, as well as types under
Microsoft.Windows.Themes) all about providing theming constructs, and they are already consumed at design-time occasionally (to peek into the respective BAML, for e.g.).The general principle of design-time assembly is appealing, but in this specific instance the distinction between
PresentationFramework.Aero2.dlland (a hypothetical)PresentationFramework.Aero2.Design.dllseems rather slim. Even if we were to inventPresentationFramework.Aero2.Design.dlland embed these XAML files as resource in them, design-time tools will likely to continue to loadPresentatitonFramework.Aero2.dllto read the BAML, negating the separation of concerns design goal.And finally, at this stage in the 3.0 (getting close to RC!), we don't want to add a new construct (namely, design-time assemblies) to WPF.
We will revisit this in .NET 5, when we look into a better approach to delivering these same XAML resources to interested consumers (notably VS).
vatsan-madhavan commentedon Jun 19, 2019
This is now available in
4.8.0-preview7.19319.15runtime.win-x64.Microsoft.DotNet.Wpf.DncEngpackage out of https://dotnetfeed.blob.core.windows.net/dotnet-windowsdesktop/index.json feed.I'd expect it to flow through core-setup into core-sdk shortly.
Related internal PR