Users Pricing

forum

Home Forums Textbox KeyBinding with AcceptsReturn = true – MindStick

Textbox KeyBinding with AcceptsReturn = true

Anonymous User 3904 04 Sep 2013

Basically I have a textbox which will accept return when a checkbox is unchecked and when it's checked I want the textbox to react on KeyBinding I wrote.

<TextBox AcceptsReturn="{Binding IsChecked, ElementName=EnterCheckbox, Converter={StaticResource InvertBooleanConverter}}" >

     <TextBox.InputBindings>

           <KeyBinding Key="Enter" Command="{Binding CmdEnterPressed}"/>

     </TextBox.InputBindings>

</TextBox >

Now in any cases, despite of fact that TextBox.AcceptsReturn is set to True when I press [Return] KeyBinding is firing and I want not to fire it but to go to next line of TB.


1 Answers

Markdown for AI

A clean, structured version of this page for AI assistants and LLMs.

Open .md