Not answered ItemContainerStyle Causing Telerik radTreeview to disappear. (WPF) -


the application based on mvvm using prism mef. have converted windows tree view control telerik radtreeview control. worked fine except itemcontainerstyle defined somehow disabling tree shown. if remove itemcontainerstyle radtreeview tree becomes visible not styling. using windows treeview same itemcontainerstyle work fine. following code.

    <uxc:uxtwindow.resources>   <hierarchicaldatatemplate x:key="sitewizardtemplate" itemssource="{binding steps}" >              <stackpanel orientation="horizontal">                  <textblock text="{binding displayas}" />              </stackpanel>          </hierarchicaldatatemplate>      </uxc:uxtwindow.resources>    <telerik:radtreeview isvirtualizing="true" itemssource="{binding wizard.wizardsections}"                            itemtemplate="{staticresource sitewizardtemplate}"                                                                          previewmousedown="treeview_previewmousedown" >                                 <telerik:radtreeview.itemcontainerstyle>                                  <style targettype="{x:type telerik:radtreeviewitem}">                                      <setter property="fontsize" value="18" />                                      <setter property="fontstyle" value="italic" />                                      <setter property="margin" value="0,5,0,10" />                                      <setter property="foreground" value="black" />                      </telerik:radtreeview.itemcontainerstyle>     </telerik:radtreeview>  

i think have extend existing style basedon property , not override it:

<style targettype="{x:type telerik:radtreeviewitem}" basedon="{staticresource {x:type telerik:radtreeviewitem}}"> 

oh , remove itemtemplate: can't set both itemtemplate , itemcontainerstyle.


Comments