Quantcast
Channel: Extended WPF Toolkit™ Community Edition
Viewing all articles
Browse latest Browse all 4964

Edited Issue: How to get Keyboard Focus on the textbox of the TokenizedTextbox [22185]

$
0
0
How do we programmatically assign Keyboard focus to the textbox component of the TokenizedTextbox control?
Comments: ** Comment from web user: BoucherS **

Hi,

This issue will be fixed in v3.0.
You will be able to call _tokenizedTextBox.Focus() and see the caret in the TokenizedTextBox.

In the meantime, you can go in file :
-Xceed/Wpf.Toolkit/TokenizedTextBox/Themes/Aero2.NormalColor.xaml (in windows 8)
-Xceed/Wpf.Toolkit/TokenizedTextBox/Themes/Generic.xaml (in other windows)
A) In the style for TokenizedTextBox,
Remove :
```
<Setter Property="Focusable"
Value="False"/>
```
Add
```
<Setter Property="IsTabStop"
Value="False"/>
```

B) In the ControlTemplate for TokenizedTextBox
In the triggers section, in the trigger "IsFocused == true",
Add the setter :
```
<Setter TargetName="PART_RichTextBox"
Property="FocusManager.FocusedElement"
Value="{Binding ElementName=PART_RichTextBox}" />
```


Viewing all articles
Browse latest Browse all 4964


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>