c# - Listview with multiple columns not acting properly when height of Item expanded -
hello need multicolumn control variable heights , expand/collapse capability. approach far this-
<listview grid.row="1" itemssource="{binding mycollection}" scrollviewer.horizontalscrollbarvisibility="disabled" grid.issharedsizescope="true" verticalcontentalignment="center"> <listview.itemspanel> <itemspaneltemplate> <wrappanel></wrappanel> </itemspaneltemplate> </listview.itemspanel> <listview.itemtemplate> <datatemplate> <control:ucnewsfeed margin="6" datacontext="{binding post}" /> </datatemplate> </listview.itemtemplate> </listview>
please notice ucnewsfeed usercontrol given below-
<grid x:name="maingrid"> <grid.rowdefinitions> <rowdefinition height="57"/> <rowdefinition height="auto"/> </grid.rowdefinitions> <grid x:name="namepanel"> <stackpanel x:name="namecontainer"> <textblock>lamia mehreen</textblock> <textblock>monday @ 12:02pm</textblock> <button/> </stackpanel> </grid> <border x:name="hiddenpanel" visibility="collapsed" grid.row="1"> <stackpanel x:name="editpanel" orientation="horizontal"> <richtextbox/> <button margin="0" foreground="{x:null}" style="{dynamicresource buttonstyle1}" borderthickness="0" background="{x:null}" borderbrush="{x:null}" focusable="false" horizontalalignment="center" verticalalignment="center" padding="0" width="37" height="37"/> </stackpanel> </border> </grid>
layout far okay. problem arises when "hiddenpanel"'s visibility switched visible code behind. entire row of listview gets height of selected row.
i need expand 1 cell only, not entire row. please suggest approach might come in handy. (i have simplified xaml easy reading, might not attached images)
Comments
Post a Comment