Telerik Silverlight RadPanelBar Hierarchical Data Template -


i need display following layout telerik panelbar.

radpanelbar template

with code below able achieve except 92% stuff in each panel.

xaml:

<usercontrol.resources>     <datatemplate x:key="panelbaritemtemplate">         <grid x:name="grdcategory" showgridlines="true">             <grid.rowdefinitions>                 <rowdefinition height="30"></rowdefinition>             </grid.rowdefinitions>             <grid.columndefinitions>                 <columndefinition width="60*"></columndefinition>                 <columndefinition width="40*"></columndefinition>             </grid.columndefinitions>             <grid x:name="grdsubcategory" grid.column="0" style="{staticresource categoryleftstyle}" >                 <grid.rowdefinitions>                     <rowdefinition height="20"></rowdefinition>                 </grid.rowdefinitions>                 <grid.columndefinitions>                     <columndefinition width="50*"></columndefinition>                     <columndefinition width="25*"></columndefinition>                     <columndefinition width="25*"></columndefinition>                 </grid.columndefinitions>                 <textblock text="{binding categorytitle}" grid.row="0" grid.column="0"/>                 <hyperlinkbutton grid.row="0" grid.column="1" style="{staticresource detaillinkstyle}" content="details" click="home_click"></hyperlinkbutton>                 <textblock text="{binding score}" grid.row="0" grid.column="2"/>             </grid>             <textblock text="92%" grid.column="1" grid.row="0" grid.rowspan="2" fontsize="32" fontweight="bold"/>         </grid>     </datatemplate>      <telerik:hierarchicaldatatemplate x:key="panelbarheadertemplate"                                 itemssource="{binding subreports}"                                 itemtemplate="{staticresource panelbaritemtemplate}">         <textblock text="{binding categorytitle}" />     </telerik:hierarchicaldatatemplate>  </usercontrol.resources>  <grid x:name="layoutroot">     <telerik:radpanelbar x:name="radpanelbar"                              itemtemplate="{staticresource panelbarheadertemplate}"                             issingleexpandpath="false" >     </telerik:radpanelbar> </grid> 

in xaml.cs file provided itemssource.

can me out?

all code works individual items, place 92% relative items (somewhat outside of sub-items) need modify itemcontainerstyle of radpanelbar. easiest way extract in blend, section under panelbaritemtopleveltemplate named itemscontainer. crude version, made public property on item called calcint calculates sum of property on subreport items can bound base item level. modified code looks so:

                <grid x:name="itemscontainer" grid.row="1" visibility="collapsed">                 <telerik:layouttransformcontrol x:name="transformationroot">                     <grid>                         <grid.columndefinitions>                             <columndefinition />                             <columndefinition />                         </grid.columndefinitions>                         <itemspresenter/>                         <textblock text="{binding calcint}" fontsize="48" grid.column="1" horizontalalignment="center" verticalalignment="center" />                     </grid>                                      </telerik:layouttransformcontrol>             </grid> 

i changed containing itemspresenter grid layout display extra-large textblock.

if need sample of code or have other questions feel free hit me on twitter - @evanhutnick.

cheers!

-evan


Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -