当我输入spacebar (" ")
wpf 文本框控件时,它会double spacebar
从视图中返回。
如何配置文本框以发送回原始输入文本而不是double spacebar
.
<DataTemplate x:Key="TextBoxDataTemplate">
<StackPanel Orientation="Horizontal" Background="AntiqueWhite">
<Label Name="lblTabTitle"
Content="{Binding TextForLabel}"
VerticalAlignment="Center"
Margin="4 4 2 4"
HorizontalAlignment="Left" Padding="0" />
<TextBox Name="inputText" Width="100" Margin="5" Text ="{Binding Text}" helpers:InputTextBoxBindingsManager.UpdatePropertySourceWhenKeyPressed="TextBox.Text"/>
<Button Name="btn"
Margin="2 0 0 0"
Padding="0"
Height="16"
Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Command="{Binding DataContext.DeleteItemCommand, ElementName=tagsList}"
CommandParameter="{Binding}">
<Image Name="img" Source="/Unive.Net;component/Images/GeneralIcons/16x16/quit.png" Width="16" Height="16" />
</Button>
</StackPanel>
</DataTemplate>