Issue in vertical scrollbar in silverlight datagrid -
i'm using silverlight datatgrid in project checkbox in header selectall option.
while scrolling datagrid vertically, header checkbox status changing randomly content checkbox status remains correct.
please me if come across issue.
<control:datagrid.rowgroupheaderstyles> <style targettype="control:datagridrowgroupheader"> <setter property="propertynamevisibility" value="collapsed" /> <setter property="background" value="lightgray" /> <setter property="foreground" value="#ff404040" /> <setter property="sublevelindent" value="15" /> <setter property="template"> <setter.value> <controltemplate targettype="control:datagridrowgroupheader"> <primitives:datagridfrozengrid name="root" background="{templatebinding background}"> <visualstatemanager.visualstategroups> <visualstategroup x:name="currentstates"> <visualstate x:name="regular"/> <visualstate x:name="current"> <storyboard> <doubleanimation storyboard.targetname="focusvisual" storyboard.targetproperty="opacity" to="1" duration="0" /> </storyboard> </visualstate> </visualstategroup> </visualstatemanager.visualstategroups> <primitives:datagridfrozengrid.resources> <controltemplate x:key="togglebuttontemplate" targettype="togglebutton"> <grid background="transparent"> <visualstatemanager.visualstategroups> <visualstategroup x:name="commonstates"> <visualstate x:name="normal"/> <visualstate x:name="mouseover"> <storyboard> <coloranimation storyboard.targetname="collapsedarrow" storyboard.targetproperty="(stroke).color" duration="0" to="#ff6dbdd1"/> <coloranimation storyboard.targetname="expandedarrow" storyboard.targetproperty="(fill).color" duration="0" to="#ff6dbdd1"/> </storyboard> </visualstate> <visualstate x:name="pressed"> <storyboard> <coloranimation storyboard.targetname="collapsedarrow" storyboard.targetproperty="(stroke).color" duration="0" to="#ff6dbdd1"/>
<path stretch="uniform" data="f1 m 0,0 l 0,1 l .6,.5 l 0,0 z" width="5" horizontalalignment="center" verticalalignment="center" x:name="collapsedarrow" visibility="collapsed" stroke="#ff414345"/> <path stretch="uniform" data="f1 m 0,1 l 1,1 l 1,0 l 0,1 z" width="6" horizontalalignment="center" verticalalignment="center" x:name="expandedarrow" fill="#ff414345"/> </grid> </controltemplate> </primitives:datagridfrozengrid.resources> <grid.columndefinitions> <columndefinition width="auto" /> <columndefinition width="auto" /> <columndefinition width="auto" /> <columndefinition width="auto" /> <columndefinition/> </grid.columndefinitions> <grid.rowdefinitions> <rowdefinition height="auto"/> <rowdefinition/> <rowdefinition height="auto"/> </grid.rowdefinitions> <rectangle grid.column="1" grid.columnspan="5" fill="#fffdd234" height="1"/> <rectangle grid.column="1" grid.row="1" name="indentspacer" /> <togglebutton grid.column="2" grid.row="1" name="expanderbutton" height="15" width="15" istabstop="false" template="{staticresource togglebuttontemplate}" margin="2,0,0,0"/> <stackpanel grid.column="3" grid.row="1" orientation="horizontal" verticalalignment="center" margin="0,1,0,1"> <checkbox tag="{binding}" name="headercheck" click="headercheck_click" horizontalalignment="left" /> </stackpanel> <rectangle grid.column="1" grid.columnspan="5" fill="#ff4f54da" height="1" grid.row="2"/> <rectangle name="focusvisual" grid.column="1" grid.columnspan="4" grid.rowspan="3" stroke="#ff6db112" strokethickness="1" horizontalalignment="stretch" verticalalignment="stretch" ishittestvisible="false" opacity="0" /> <primitives:datagridrowheader name="rowheader" grid.rowspan="3" primitives:datagridfrozengrid.isfrozen="true" /> </primitives:datagridfrozengrid> </controltemplate> </setter.value> </setter> </style> </control:datagrid.rowgroupheaderstyles>
you have header checkbox bound current item , scroll changes. not bind checkbox unless using setter change of values in itemssource collection. in case make sure nothing else changing value of property bound to.
Comments
Post a Comment