c# - Selecting a partially displayed WPF checkbox -


i having design problem , know there has way make work. tried solutions here: annoying auto scroll of partially displayed items in wpf listview didnt work me because not allowed work in code-behind. have list of items wpf listbox. this:

listbox picture

when try select checkbox in line 5, window centers on not check it. after further testing, found not select checkbox long bottom border of item not in view.

here xaml listbox , style:

<listbox grid.column="0" grid.row="1" name="requestcheckoutv"          itemssource="{binding path=checkoutvm, mode=twoway, isasync=true}"          selecteditem="{binding path=selectedpermit}"          borderthickness="0"          keyboardnavigation.tabnavigation="continue">   <listbox.itemcontainerstyle>     <style targettype="{x:type listboxitem}">       <setter property="keyboardnavigation.istabstop" value="false" />       <setter property="background" value="transparent" />       <setter property="control.horizontalcontentalignment" value="center"/>       <setter property="control.verticalcontentalignment" value="top"/>       <setter property="template">         <setter.value>           <controltemplate targettype="{x:type listboxitem}"  >             <contentpresenter />           </controltemplate>         </setter.value>       </setter>     </style>   </listbox.itemcontainerstyle> </listbox> 

what can make select checkbox instead of centering it? appreciated.

so adding specification of "press" clickmode property checkbox via clickmode="press" you're telling object ignore event otherwise hijacked list item template. accept first event in it's hit area instead of list item since it's default "release". cheers :)


Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -