From 8e5cdd3b77aad97d1cb0db6d64ca75573fa73b17 Mon Sep 17 00:00:00 2001 From: Christian Date: Thu, 18 Dec 2025 12:49:25 -0700 Subject: [PATCH] Fix hostname field input blocking in SCMU # Fix hostname field input blocking in ServiceControl Management Utility **Fixes #5190** ## Problem The hostname fields in the ServiceControl Management Utility (SCMU) were blocking valid dash (`-`) characters from being typed, while allowing invalid characters like `/[]|`. This was caused by CheckBox controls intercepting keystrokes for nested TextBox controls in the add instance views. Users reported that typing `-` would not work but typing any of `/[]|` does work. The only workaround was to paste the dash character from the clipboard. ## Root Cause The issue occurred because: 1. TextBox controls for hostname input were nested inside CheckBox controls in the XAML layout 2. WPF CheckBox controls intercept certain keystrokes (including dashes) for their nested content 3. This prevented users from typing dashes directly into hostname fields, requiring copy/paste workarounds ## Solution Restructured the UI layout in the add instance views to separate CheckBox and Expander controls using a Grid-based horizontal layout. ### Before: ```xaml ``` ### After: ```xaml ``` --- .../UI/InstanceAdd/ServiceControlAddView.xaml | 197 +++++++++++------- 1 file changed, 119 insertions(+), 78 deletions(-) diff --git a/src/ServiceControl.Config/UI/InstanceAdd/ServiceControlAddView.xaml b/src/ServiceControl.Config/UI/InstanceAdd/ServiceControlAddView.xaml index 950c834121..4b09b4623c 100644 --- a/src/ServiceControl.Config/UI/InstanceAdd/ServiceControlAddView.xaml +++ b/src/ServiceControl.Config/UI/InstanceAdd/ServiceControlAddView.xaml @@ -78,10 +78,29 @@ Foreground="{StaticResource ErrorBrush}" Text="Must select either an audit or an error instance." /> - - - - + + + + + + + + + + + + @@ -120,7 +139,7 @@ Text="{Binding ErrorPassword}" Visibility="{Binding ErrorPasswordEnabled, Converter={StaticResource boolToVis}}" /> - @@ -237,93 +256,114 @@ SelectedValue="{Binding ErrorEnableFullTextSearchOnBodies}" /> - - + + - - - - + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - - - - - + + + - - - + + - - - + - - - - - - + - - - - - - - - - - - - - - - - + + + + + + + + + + + + - - - - + - - - - + - - - + + + +