Skip to content

Commit 48e5669

Browse files
Yu Leng (from Dev Box)claude
andcommitted
[KBM] Fix Action panel not showing for Text Expand trigger type
Replace XAML binding on SwitchPresenter.Value with code-behind sync to avoid binding/direct-assignment conflict when ComboBox items are dynamically replaced for the Expand trigger type. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent a67cfd7 commit 48e5669

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/modules/keyboardmanager/KeyboardManagerEditorUI/Controls/UnifiedMappingControl.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@
265265
<tkcontrols:SwitchPresenter
266266
x:Name="ActionSwitchPresenter"
267267
TargetType="x:String"
268-
Value="{Binding SelectedItem.Tag, ElementName=ActionTypeComboBox}">
268+
Value="KeyOrShortcut">
269269
<!-- Key or Shortcut Action -->
270270
<tkcontrols:Case Value="KeyOrShortcut">
271271
<ToggleButton

src/modules/keyboardmanager/KeyboardManagerEditorUI/Controls/UnifiedMappingControl.xaml.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,12 @@ private void ActionTypeComboBox_SelectionChanged(object sender, SelectionChanged
258258
{
259259
string? tag = item.Tag?.ToString();
260260

261+
// Sync SwitchPresenter with the selected action type
262+
if (tag != null && ActionSwitchPresenter != null)
263+
{
264+
ActionSwitchPresenter.Value = tag;
265+
}
266+
261267
// Cleanup keyboard hook when switching away from key/shortcut
262268
if (tag != "KeyOrShortcut")
263269
{

0 commit comments

Comments
 (0)