elementname contracting damaged controltemplate


i have listview organization items. organization uses tradition groupstyle (expander). i have check box enhance fall groups when. works glorious untill i click manually organisation header enhance fall group. after clicking sole organisation stops respond check box selection. looks contracting damaged after user manually clicks group.



please advise i am doing wrong.



thanks lot.



sincerely,
vlad.



<window xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'
xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'>
<window.resources>
<xmldataprovider x:key="mydata" xpath="/info">
<x:xdata>
<info xmlns="">
<item name="item 1" category="cat1" />
<item name="item 2" category="cat1" />
<item name="item 3" category="cat2" />
<item name="item 4" category="cat2" />
<item name="item 5" category="cat2" />
<item name="item 6" category="cat3" />
</info>
</x:xdata>
</xmldataprovider>

<collectionviewsource x:key='src' source="{binding source={staticresource mydata}, xpath=item}">
<collectionviewsource.groupdescriptions>
<propertygroupdescription propertyname="@category" />
</collectionviewsource.groupdescriptions>
</collectionviewsource>

<controltemplate x:key="listtemplate" targettype="listview">
<listview borderthickness="0"
itemssource='{binding relativesource={relativesource templatedparent}, path=itemssource}'
displaymemberpath="{binding relativesource={relativesource templatedparent}, path=displaymemberpath}">
<listview.groupstyle>
<groupstyle>
<groupstyle.containerstyle>
<style targettype="{x:type groupitem}">
<setter property="margin" value="0,0,0,5" />
<setter property="template">
<setter.value>
<controltemplate targettype="{x:type groupitem}">
<expander isexpanded="{binding ischecked, elementname=chkexpandall, mode=oneway}">
<expander.header>
<dockpanel>
<textblock fontweight="bold" text="{binding path=name}" margin="5,0,0,0" width="100" />
<textblock fontweight="bold" text="{binding path=itemcount}" />
</dockpanel>
</expander.header>
<expander.content>
<itemspresenter />
</expander.content>
</expander>
</controltemplate>
</setter.value>
</setter>
</style>
</groupstyle.containerstyle>
</groupstyle>
</listview.groupstyle>
</listview>
</controltemplate>
</window.resources>

<stackpanel>
<checkbox name="chkexpandall" ischecked="true" content="expand all" />
<listview itemssource='{binding source={staticresource src}}' displaymemberpath="@name" borderthickness="1" template="{staticresource listtemplate}" />
</stackpanel>

</window>


Comments

Popular posts from this blog

why does floated <input> control floated component slip over too distant right ie7, nonetheless firefox?

grails record upload problems

how i emanate permitted url asp.net mvc?