Hi,
In my XamDockManager i have 4 content pane, 3 docked bottom and 1 docked at right side.
I have some textbox in right docked pane. How can i set focus on textbox when the screen is load
/ based on some click event of the main screen (All docked pane may or maynot be in pinned and unpinned state)
I tried using textBox1.Focus(); This is not working. What i have to do for this?
You can call the Activate method of the containing ContentPane. That will ensure that the pane is brought into view. This will also focus the first control in the navigation order within the contentpane. If you still have a problem, please post a sample and we can look at it.
Hi Andrew,
In my case, the ContentPane.Activate() method sets the focus on the first editable control only if the pane is not pinned. When the pane is pinned, the focus is not set. Should we need to do anything extra on this.
Thanks,
Ganesh
My original statement was a little inaccurate. The Activate method will bring the element into view and will attempt to focus the previously focused element within the pane. If there wasn't anything focused previously (e.g. the FocusManager.FocusedElement property is null) then it would try to focus the first element within. Whether the pane is pinned or not should not affect the behavior. Do you have an example of this not working?