## Summary of the Pull Request In the wake of #6635, a couple things got missed in merges: * `toggleRetroEffect` didn't get into the schema, nor did `renameTab` or `commandPalette`. * `toggleRetroEffect` also didn't get a name Furthermore, I thought it might be a good idea to start sticking commands into `bindings` even without `keys`. So I tried doing that for `opentabColorPicker` and `toggleRetroEffect`, and found immediately that the labels for the key chord still appear even when the text is empty. So I added some XAML magic to hide those when the text is empty. ## References * #6762 * #6691 * #6557 * #6635 ## PR Checklist * [x] Closes #6762 * [x] I work here * [x] Tests added/passed * [n/a] Requires documentation to be updated ## Detailed Description of the Pull Request / Additional comments * See also: https://docs.microsoft.com/en-us/windows/uwp/data-binding/data-binding-quickstart#formatting-or-converting-data-values-for-display - make sure to switch to C++/WinRT at the top! ## Validation Steps Performed Removed all my manual actions, ran the Terminal: ![image](https://user-images.githubusercontent.com/18356694/86652356-f5a79400-bfa9-11ea-9131-5b7d3e835e19.png)
20 lines
827 B
Plaintext
20 lines
827 B
Plaintext
// Copyright (c) Microsoft Corporation.
|
|
// Licensed under the MIT license.
|
|
|
|
namespace TerminalApp
|
|
{
|
|
// See https://docs.microsoft.com/en-us/windows/uwp/data-binding/data-binding-quickstart
|
|
|
|
// We use the default attribute to declare IValueConverter as the default
|
|
// interface. In the listing, CommandKeyChordVisibilityConverter has only a
|
|
// constructor, and no methods, so no default interface is generated for it.
|
|
// The default attribute is optimal if you won't be adding instance members
|
|
// to CommandKeyChordVisibilityConverter, because no QueryInterface will be
|
|
// required to call the IValueConverter methods
|
|
runtimeclass CommandKeyChordVisibilityConverter : [default] Windows.UI.Xaml.Data.IValueConverter
|
|
{
|
|
CommandKeyChordVisibilityConverter();
|
|
};
|
|
|
|
}
|