mirror of
https://github.com/microsoft/terminal.git
synced 2025-12-11 04:38:24 -06:00
Updates the Terminal to Microsoft.UI.Xaml v2.8. * MUX 2.8 adds a dependency on WebView2, so we need to include parts of it too. * See https://github.com/microsoft/microsoft-ui-xaml/pull/7574 for why we're adding the `.props` * The TabView thing: > tl;dr: In >=MUX 2.7, we were updating our tab colors by doing a "Visual State Dance", as I called it. We'd manually change the `TabViewItem`'s VisualState to one that it wasn't in, then change it back to the one it should be in. This seemingly re-applied the new values of the brushes. However in 2.8, this seemingly didn't work anymore! > > So instead, we do a "Theme Dance", like so: > ```c++ > const auto& reqTheme = TabViewItem().RequestedTheme(); > TabViewItem().RequestedTheme(ElementTheme::Light); > TabViewItem().RequestedTheme(ElementTheme::Dark); > TabViewItem().RequestedTheme(reqTheme); > ``` > This causes the `ThemeResource`s to be re-evaluated to the new values. > We never got to the root cause of why this seems different in 2.8. It literally makes no sense. Closes #13495 Co-authored-by: Dustin L. Howett <duhowett@microsoft.com>
17 lines
736 B
XML
17 lines
736 B
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
<!--
|
|
This file contains targets that override behavior in Microsoft.UI.Xaml and
|
|
related packages.
|
|
|
|
For example: All XAML needs is a reference to WebView2; it does not need the
|
|
DLL and it does not need for us to copy the WinMD into the output folder. It
|
|
also doesn't require the WebView2 loader since we're not actually using
|
|
WebView2. Therefore, we can get away with *not including the WebView2
|
|
package* and only adding a reference to its winmd.
|
|
-->
|
|
<ItemGroup>
|
|
<Reference Include="$(WebView2PackageRoot)\lib\Microsoft.Web.WebView2.Core.winmd" />
|
|
</ItemGroup>
|
|
</Project>
|