Hi Constantin Patak,
Query 1: When I click the second RibbonTextBox (the one with the GotFocus event) it selects all the text and instantly deselects it
In our earlier sample we had given for Keyboard Focus. Now we have modified the sample for both Mouse and Keyboard focus. In the sample, we have handled the PreviewMouseLeftButtonDown event and set Focus to the RibbonTextBox. Also we have used GotKeyboardFocus event in place of GotFocus for setting focus theough Keyboard.
Query 2: And in the following scenario: click in the second RibbonTextBox -> click in the text under the Ribbon -> click again in the second RibbonTextBox, the GotFocus event does not trigger again.
We have checked this with MS TextBox and it has the same behavior. We have modified the sample as mentioned above, to provide focus on mouse events separately.
Please find the modified sample in the following link.
Sample:
Ribbon_131602.zipPlease let us know if our solution fulfills your requirements and if you require further assistance on this.
Regards,
Bharadhi K