Click here to Skip to main content
15,886,110 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i'm using the tray notification through hardcodet.net » WPF NotifyIcon

using the that code i'm shown the custom ballon in that ballon contains several controls.
the problem is text box not focused on the custom ballon any one help me
thank you.
Posted
Updated 4-May-15 22:34pm
v2

1 solution

did you try

texbox.focus(); ?

try this

FocusManager.SetFocusedElement(parentElement, textbox)

and in xaml

XML
<StackPanel FocusManager.FocusedElement="{Binding ElementName=Box}">
   <TextBox Name="Box" />
</StackPanel>
 
Share this answer
 
v2
Comments
[no name] 6-May-15 2:47am    
yes i tried all above. are you used hardcodet's notification project.?, when i opened the ballon 2'nd time ballon not focused. i'm used events to focus the main window such as topmost(), if you are got the same problem then only you find my need. thank you
Real_Criffer 6-May-15 4:44am    
http://www.hardcodet.net/2010/03/input-focus-from-the-view-model-configured-via-blend-behaviors

this might be the solution for you ^^ Hope this help

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900