c# - Silverlight Toolkit Accordion in TreeView -
I am trying to get SL Tookit (March 2009) to populate the ItemTemplate of the Accordion control TreeView control, but the
It does not render properly (only 1x1 pixel square)
Here's my XML:
& Lt; / DataTemplate & gt; & Lt; / Take: Accordion.HeaderTemplate & gt; & Lt; Take: Accordion.ContentTemplate & gt; & Lt; DataTemplate & gt; & Lt; StackPanel Orientation = "Horizontal" & gt; & Lt; Text block text = "value:" /> & Lt; Text block text = "{binding value}" /> & Lt; / StackPanel & gt; & Lt; / DataTemplate & gt; & Lt; / Take: Accordion.ContentTemplate & gt; & Lt; / Lo: Accordion & gt; & Lt; / DataTemplate & gt; & Lt; / T: TreeView.ItemTemplate & gt; & Lt; / T: TreeView & gt; & Lt; / Grid & gt; & Lt; / UserControl & gt; and codebehind:
using the system; Using System.Collections.Generic; Using System.Linq; Using System.Net; Using System.Windows; Using System.Windows.Controls; Using System.Windows.Documents; Using System.Windows.Input; System.Windows.Media; Using System.Windows.Media.Animation; Using System.Windows.Shapes; Namespace SilverlightTest {Public Partial Class Home Page: UserControl {Public Main Page () {InitializeComponent (); String, string & gt; ("Item 2", "new", "key", "new", "," Ken "), new keywire & lt; string, string> (" item 3 "," grapefruit "), new kevalpeare & Lt; string, string & gt; ("item 4", "kiwi")} Tv.ItemsSource = data;}}} What can I do to do that I want to?
you
tv.UpdateLayout ();
should be completed by adding it.
/ Mick
Comments
Post a Comment