wpf - Caliburn.Micro ShowPopup - set focus -


i'm trying use caliburn.micro (for first wpf mvvm project) , i'm struggling getting windowmanager.showpopup method set focus popup screen. possible? sample hellowindowmanager caliburn doesn't either, , documentation pretty light.

ultimately, unable showpopup method work wanted.

what did instead use showwindow, , used eventaggregator publish event when showing window. in viewmodel called view, subscribed event, , set property on viewmodel true (named keywordentryactive in example).

i use style on grid uses datatrigger bound property call focusmanager.focusedelement method in view.

<grid.style>     <style>         <style.triggers>             <datatrigger binding="{binding keywordentryactive}" value="true">                 <setter property="focusmanager.focusedelement" value="{binding elementname=command}" />             </datatrigger>         </style.triggers>     </style> </grid.style> 

it seemed less straightforward hoped, able accomplish looking without sacrificing separation of viewmodel , view, i'm satisfied @ point. there's been bit of learning curve caliburn.micro far i've been able overcome snags i've run into, , i'm continuing down path.


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -