Wpf: Theme assemblies cannot be referenced from XAML in latest SDK

Created on 7 Aug 2019  路  2Comments  路  Source: dotnet/wpf

This is related to #765, which primarily deals with the inability to reference theme assemblies for consumption in C#/VB etc. code.

In recent preview8 builds, XAML like this no longer builds because the WPF theme assembles are no longer referenced by default by Microsoft.WindowsDesktop.

... xmlns:theme="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero"

<theme:SystemDropShadowChrome>
       <HeaderedContentControl Padding="10" Foreground="#CCFFFFFF">
              <HeaderedContentControl.Header>

Given there is no way to reference these directly at build-time, the theme assemblies are not complete unusable.

This change was made by https://github.com/dotnet/core-setup/issues/7218, which was done in due to a miscommunication between the WPF and the SDK teams. We are working together to undo this change for .NET Core 3.0.

Also related: https://github.com/dotnet/sdk/issues/3265
This issue tracks work in dotnet/sdk: https://github.com/dotnet/sdk/issues/3512

hot issue-type-bug issue-type-tracking-external regression

Most helpful comment

I was able to build a simple project referencing SystemDropShadowChrome from different theme assemblies using 3.0.100-preview9-013756.

Closing.

All 2 comments

@rladuca the core-sdk build coming out today https://github.com/dotnet/core-sdk/pull/3907/checks?check_run_id=190165861 should have this fix. would you mind verifying and closing?

I was able to build a simple project referencing SystemDropShadowChrome from different theme assemblies using 3.0.100-preview9-013756.

Closing.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

daniel-white picture daniel-white  路  3Comments

pocki picture pocki  路  3Comments

skanvk15 picture skanvk15  路  3Comments

juepiezhongren picture juepiezhongren  路  3Comments

h82258652 picture h82258652  路  3Comments