I have a grid that uses a multline xamTextEditor by using a style:
Here is the style:
<Style x:Key="TextboxWrapping" TargetType="{x:Type igEditors:XamTextEditor}"> <Setter Property="TextWrapping" Value="Wrap" /> <Setter Property="Height" Value="75" /> <Style.Resources> <Style TargetType="{x:Type TextBox}"> <Setter Property="AcceptsReturn" Value="True"/> </Style> </Style.Resources> </Style>
It works fine. But the grid is in a tab control and when you enter the first record of the grid and tab out of textEditor it switches the tab page. I go back to the tab with the grid and record was added. If I enter a new record and tab out it does not switch tab page.
So I was thinking if I can use ctrl + Enter when I need a newline in the texteditor then if I hit enter the record gets added that should not switch the tab page.
Any ideas how to use ctrl + Enter for multiline textEditor?
Thanks
You could make Cntl-Enter work. You would have to handle the KeyDown event to read the keys. When the user presses Cntl-Enter, you "Handle" the event (by the args.Handled to true) and you would explicitly append the carriage return to the end of the text after first deleting the selection.
Another approach would be to disable logical focus on the tab when your editor has key focus.
Sorry no one has responded to this post sooner. Let us know if you need further assistance.
Thanks!
hmm I guess it's not possible.