uia names

This commit is contained in:
Pankaj Bhojwani 2025-06-16 16:33:39 -07:00
parent 7db0cd6ad4
commit d862d67142
3 changed files with 12 additions and 0 deletions

View File

@ -989,6 +989,10 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
DeleteKeyChordRequested.raise(*this, _currentKeys);
}
hstring KeyChordViewModel::CancelButtonName() const noexcept { return RS_(L"Actions_CancelButton/[using:Windows.UI.Xaml.Controls]ToolTipService/ToolTip"); }
hstring KeyChordViewModel::AcceptButtonName() const noexcept { return RS_(L"Actions_AcceptButton/[using:Windows.UI.Xaml.Controls]ToolTipService/ToolTip"); }
hstring KeyChordViewModel::DeleteButtonName() const noexcept { return RS_(L"Actions_DeleteButton/[using:Windows.UI.Xaml.Controls]ToolTipService/ToolTip"); }
ActionsViewModel::ActionsViewModel(Model::CascadiaSettings settings) :
_Settings{ settings }
{

View File

@ -235,6 +235,11 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
void CancelChanges();
void DeleteKeyChord();
// UIA Text
hstring CancelButtonName() const noexcept;
hstring AcceptButtonName() const noexcept;
hstring DeleteButtonName() const noexcept;
VIEW_MODEL_OBSERVABLE_PROPERTY(bool, IsInEditMode, false);
VIEW_MODEL_OBSERVABLE_PROPERTY(Control::KeyChord, ProposedKeys);
VIEW_MODEL_OBSERVABLE_PROPERTY(winrt::hstring, KeyChordText);

View File

@ -118,6 +118,9 @@ namespace Microsoft.Terminal.Settings.Editor
void AttemptAcceptChanges();
void CancelChanges();
void DeleteKeyChord();
String CancelButtonName { get; };
String AcceptButtonName { get; };
String DeleteButtonName { get; };
event Windows.Foundation.TypedEventHandler<KeyChordViewModel, Microsoft.Terminal.Control.KeyChord> AddKeyChordRequested;
event Windows.Foundation.TypedEventHandler<KeyChordViewModel, ModifyKeyChordEventArgs> ModifyKeyChordRequested;