DatePicker: both textbox and button get keyboard focus? - wpf

Is there a way to get focus on both controls in the WPF DatePicker? Setting the Focusable property on both makes neither work.
We would like users to be able to tab to both controls instead of focus only going to the textbox. Thanks!

I got some help on this. I needed to set the KeyboardNavigation.TabNavigation property to "Continue", then it worked. Thanks to Sam for the fix.

Related

Tooltip Display Issue

I have added a tooltip into my code ToolTipService.ToolTip="Submit Changes" in Button control.
I also used a Radpane telerik control on my page.when i move mouse on button the tooltip is hiding behind Radpane control.
I want to display it on that telerik control. Please give me suggestion.
Thank you
If this still giving you issues try changing the z-order of the ToolTip in relation to the button so that it displays on top of the control. Hope this helps!
You must first set property to enable focus behaiviars.
set IsHitTestVisible="True"

SetFocus to a textbox wpf

I want to set focus to a textbox always. I am creating a application in wpf, in the search page there is a textbox i want to set focus to that textbox always, if the user clicks anywhere in the page the taxtbox should gain the focus. How to achieve this task.
Geetha.
Despite the solution of handling the LostKeyboardFocus and LostKeyboardFocus and set the focus to the same element again using Keyboard.Focus method, you can find a lot of advices and other solutions here

Focus on a Border in a Canvas

I have a Canvas and in it a Border. Now I want to give focus to this Border.
Can somebody please tell me how do do this?
First, make sure you have Border.Focusable = True. After that, just call Border.Focus() and you should be good to go.
I haven't tried it for Borders, but with a WPF ContentControl, I think I had to set IsTabStop and IsEnabled to true to get it to be able to accept focus.

Change the position of the textbox validation

The new data validation in silverlight 3 has a red textbox that flies out to the right. This is a problem for me because I have have a textbox to the right that is getting covered by the popup.
How can I make this popup move somewhere else?
Retemplate the textbox. The tooltip is found in there. You can modify it using the placement property or margins to appear elsewhere.

WPF Editable Combobox IsFocused problem

I am developing a Watermarked ComboBox by modifying the ComboBox ControlTemplate. Everything is fine when the ComboBox is not in an editable mode, but when I change the edit mode to True, the IsFocused property is never set to True. This is because in edit mode, the ComboBox is using a TextBox. This is an exact copy of this StackOverflow question: . There are no responses to that question.
Please drop a line if you know how to solve this, or please point me to links that provide a Watermark ComboBox implementation.
Thanks,
Rey.
You could try to use the IsKeyboardFocused or IsKeyboardFocusWithin instead
Try using the IsFocused or IsKeyboardFocused or IsKeyboardFocusWithin properties of the TextBox control which is within the ComboBox control. The TextBox can be found at e.OriginalSource(TextChangedEventArgs property).
It worked for me.

Resources