2

Really simple question... how do I get the RibbonTextBox to accept the Return or Enter keys to enable multi line text input?

On a normal TextBox, I'd just set the TextBoxBase.AcceptsReturn Property to True to set a value that indicates how the text editing control responds when the user presses the ENTER key, but that doesn't seem to do anything on the RibbonTextBox.

Just to note, the related TextBoxBase.AcceptsTab Property also does not work on the RibbonTextBox, so it seems as though they have simply overlooked these properties when developing the RibbonTextBox.

Does anyone know if there is a work around, or will it simply not work?

Deduplicator
  • 44,692
  • 7
  • 66
  • 118
Sheridan
  • 68,826
  • 24
  • 143
  • 183
  • Did you try setting it via a setter to the TextBox TargetType? Like `>>`? I couldn't seem to find the default template for it but I'd assume there's one in there somewhere, just may not have that property bound to the template. – Chris W. Jan 28 '15 at 15:44
  • I hadn't tried that, but I just did and unfortunately it didn't make any difference. – Sheridan Jan 28 '15 at 17:29
  • I'd pull out the template for it (since I couldnt find the default in the docs with a quick search) and see if it's actually a TextBox in there or like a ScrollViewer / ContentPresenter or something and see what you're dealing with. If it happens to be the latter you could just replace it with TextBox bound to Content – Chris W. Jan 28 '15 at 17:45
  • It's definitely a `TextBox` because intellisense shows the `TextBoxBase.AcceptsReturn` and `TextBoxBase.AcceptsTab` properties... they just don't work. Good old Microsoft and their half-arsed attitude. – Sheridan Jan 29 '15 at 08:55

0 Answers0