Skip to content

Need to embed wpf loose theme files into their theme assemblies #865

Closed

Description

@chabiss

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

XAML Assembly
aero.normalcolor.xaml PresentationFramework.Aero.dll
aero2.normalcolor.xaml PresentationFramework.Aero2.dll
aerolite.normalcolor.xaml PresentationFramework.AeroLite.dll
classic.xaml PresentationFramework.Classic.dll
luna.homestead.xaml PresentationFramework.Luna.dll
luna.metallic.xaml
luna.normalcolor.xaml
royale.normalcolor.xaml PresentationFramework.Royale.dll

Activity

  1. vatsan-madhavan commented on Jun 4, 2019

    @vatsan-madhavan
    Member

    This is something we have agreed with the VS team to deliver in Preview 8.

  2. added
    Enhancement Requested
    on Jun 4, 2019
  3. added this to the 3.0 milestone on Jun 4, 2019
  4. weltkante commented on Jun 5, 2019

    @weltkante

    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.

  5. vatsan-madhavan commented on Jun 5, 2019

    @vatsan-madhavan
    Member

    Old framework had design time companion DLLs

    Which DLLs are you referring to?

  6. weltkante commented on Jun 5, 2019

    @weltkante

    @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.

  7. vatsan-madhavan commented on Jun 7, 2019

    @vatsan-madhavan
    Member

    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 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.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).

  8. modified the milestones: 3.0, Preview on Jun 18, 2019
  9. vatsan-madhavan commented on Jun 19, 2019

    @vatsan-madhavan
    Member

    This is now available in 4.8.0-preview7.19319.15 runtime.win-x64.Microsoft.DotNet.Wpf.DncEng package 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.

    image

    Related internal PR

  10. ghost locked as resolved and limited conversation to collaborators on Apr 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Enhancement Requestedarea-infrastructure

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions