I'm using the Xceed.Wpf.Toolkit.DropDownButton. Objective, set keyboard focus programatically.
Just setting ddl.Focus() seems to focus the entire control. I'm trying to get the focus level for keyboard input (so pressing enter pops up the content, also this level of focus is indicated by the presence of the focus rectangle). I have to press tab after setting focus() to get to that 'secondary' level of focus I want.
Any ideas?
Comments: ** Comment from web user: BoucherS **
Just setting ddl.Focus() seems to focus the entire control. I'm trying to get the focus level for keyboard input (so pressing enter pops up the content, also this level of focus is indicated by the presence of the focus rectangle). I have to press tab after setting focus() to get to that 'secondary' level of focus I want.
Any ideas?
Comments: ** Comment from web user: BoucherS **
Hi,
Thanks for reporting this. It will be fixed in v2.8.
In the meantime, you can add the following in file Xceed.Wpf.Toolkit/DropDownButton/Implementation/DropDownButton.cs :
```
protected override void OnGotFocus( RoutedEventArgs e )
{
base.OnGotFocus( e );
this.Button.Focus();
}
```