AutomationProperties of interest in this PR include... - Name: the name of a UI element (generally used as the main identifier for it) - HelpText: an additional description for a more complex UI element - AccessibilityView[1] - Raw: hide from the UIA tree. Only navigate to this if you know what you're doing - Control: a control without any content in it. Basically, a point at which the user can make a decision as to how to navigate the tree or invoke an action. - Content: a control that also has content to present to the user. I set a few more AutomationProperties throughout Windows Terminal... - MinMaxClose Control: hidden (we can/should rely on the true buttons that we are hiding) - SplitButton: Name and Help text (currently ignored due to #4804, but having it in the resource file won't cause any problems) - SearchBox: added a more specific name to the close button - BackgroundImage: hide it ## References A few additional work items have been created for tracking... - SplitButton: https://github.com/microsoft/terminal/issues/4804 ## PR Checklist * [X] Closes #2099 * [X] Closes #2102 ## Validation Steps Performed Verified using Accessibility Insights and Inspect.exe [1] https://docs.microsoft.com/en-us/windows/win32/winauto/uiauto-treeoverview
73 lines
4.7 KiB
XML
73 lines
4.7 KiB
XML
<!-- Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
|
|
the MIT License. See LICENSE in the project root for license information. -->
|
|
<ContentPresenter
|
|
x:Class="TerminalApp.TabRowControl"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:local="using:TerminalApp"
|
|
xmlns:mux="using:Microsoft.UI.Xaml.Controls"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
mc:Ignorable="d">
|
|
|
|
<mux:TabView x:Name="TabView"
|
|
VerticalAlignment="Bottom"
|
|
HorizontalContentAlignment="Stretch"
|
|
IsAddTabButtonVisible="false"
|
|
TabWidthMode="Equal"
|
|
CanReorderTabs="True"
|
|
CanDragTabs="True"
|
|
AllowDropTabs="True">
|
|
|
|
<mux:TabView.TabStripFooter>
|
|
<mux:SplitButton
|
|
x:Name="NewTabButton"
|
|
x:Uid="NewTabSplitButton"
|
|
Click="OnNewTabButtonClick"
|
|
VerticalAlignment="Stretch"
|
|
HorizontalAlignment="Left"
|
|
Content=""
|
|
UseLayoutRounding="true"
|
|
FontFamily="Segoe MDL2 Assets"
|
|
FontWeight="SemiLight"
|
|
FontSize="12"
|
|
AutomationProperties.AccessibilityView="Control">
|
|
<!-- U+E710 is the fancy plus icon. -->
|
|
<mux:SplitButton.Resources>
|
|
<!-- Override the SplitButton* resources to match the tab view's button's styles. -->
|
|
<ResourceDictionary>
|
|
<ResourceDictionary.ThemeDictionaries>
|
|
<ResourceDictionary x:Key="Light">
|
|
<StaticResource x:Key="SplitButtonBackground" ResourceKey="TabViewItemHeaderBackground" />
|
|
<StaticResource x:Key="SplitButtonForeground" ResourceKey="SystemControlBackgroundBaseMediumBrush" />
|
|
<StaticResource x:Key="SplitButtonBackgroundPressed" ResourceKey="TabViewItemHeaderBackgroundPressed" />
|
|
<StaticResource x:Key="SplitButtonForegroundPressed" ResourceKey="SystemControlBackgroundBaseMediumHighBrush" />
|
|
<StaticResource x:Key="SplitButtonBackgroundPointerOver" ResourceKey="TabViewItemHeaderBackgroundPointerOver" />
|
|
<StaticResource x:Key="SplitButtonForegroundPointerOver" ResourceKey="SystemControlBackgroundBaseMediumHighBrush" />
|
|
</ResourceDictionary>
|
|
<ResourceDictionary x:Key="Dark">
|
|
<StaticResource x:Key="SplitButtonBackground" ResourceKey="TabViewItemHeaderBackground" />
|
|
<StaticResource x:Key="SplitButtonForeground" ResourceKey="SystemControlBackgroundBaseMediumBrush" />
|
|
<StaticResource x:Key="SplitButtonBackgroundPressed" ResourceKey="TabViewItemHeaderBackgroundPressed" />
|
|
<StaticResource x:Key="SplitButtonForegroundPressed" ResourceKey="SystemControlBackgroundBaseMediumHighBrush" />
|
|
<StaticResource x:Key="SplitButtonBackgroundPointerOver" ResourceKey="TabViewItemHeaderBackgroundPointerOver" />
|
|
<StaticResource x:Key="SplitButtonForegroundPointerOver" ResourceKey="SystemControlBackgroundBaseMediumHighBrush" />
|
|
</ResourceDictionary>
|
|
<ResourceDictionary x:Key="HighContrast">
|
|
<StaticResource x:Key="SplitButtonBackground" ResourceKey="TabViewItemHeaderBackground" />
|
|
<StaticResource x:Key="SplitButtonForeground" ResourceKey="SystemControlBackgroundBaseMediumBrush" />
|
|
<StaticResource x:Key="SplitButtonBackgroundPressed" ResourceKey="TabViewItemHeaderBackgroundPressed" />
|
|
<StaticResource x:Key="SplitButtonForegroundPressed" ResourceKey="SystemControlBackgroundBaseMediumHighBrush" />
|
|
<StaticResource x:Key="SplitButtonBackgroundPointerOver" ResourceKey="TabViewItemHeaderBackgroundPointerOver" />
|
|
<StaticResource x:Key="SplitButtonForegroundPointerOver" ResourceKey="SystemControlBackgroundBaseMediumHighBrush" />
|
|
</ResourceDictionary>
|
|
</ResourceDictionary.ThemeDictionaries>
|
|
</ResourceDictionary>
|
|
</mux:SplitButton.Resources>
|
|
</mux:SplitButton>
|
|
</mux:TabView.TabStripFooter>
|
|
|
|
</mux:TabView>
|
|
|
|
</ContentPresenter>
|