vb.net - Unable to get the popup open in WPF -
so, trying create calendar popup opens textbox focus. below code using.
<textbox x:name="calendartextbox" borderbrush="#cccccccc" foreground="#ff777777" horizontalalignment="right" width="305" height="30" verticalcontentalignment="center" panel.zindex="10" margin="0,10,10,0" verticalalignment="top" selectionbrush="#ff0081a7" borderthickness="2" gotfocus="calendartextbox_gotfocus" lostfocus="calendartextbox_lostfocus"/> <popup x:name="popupcalendar" placementtarget="{binding elementname=calendartextbox}" staysopen="false" width="305" height="305" panel.zindex="200"> <telerik:radcalendar horizontalalignment="left" verticalalignment="bottom" orientation="vertical" areweeknamesvisible="false" width="305" height="305"> <telerik:stylemanager.theme> <telerik:windows8theme/> </telerik:stylemanager.theme> </telerik:radcalendar> </popup>
code behind:
private sub calendartextbox_gotfocus(sender object, e routedeventargs) popupcalendar.isopen = true end sub private sub calendartextbox_lostfocus(sender object, e routedeventargs) popupcalendar.isopen = false end sub
the similar code works other popup in page. somehow calendar doesn't show @ all. weird thing is, code executed properly, after that, there no calendar popup on page. unable figure out missed. have increased zindex high number.
turns out stays open property causing problems. set true , worked. both events fire expected.
Comments
Post a Comment