Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
355
XamWebMenu: Programmatically building tree control for XamWebMenuItem
posted

(Note: I'm not sure why there are numerous blank lines in the resulting post -- in Preview mode -- as it looks fine in the 'Compose' editor.)

Using XAML, I am able to define a menu item (XamWebMenuItem) within a menu (XamWebMenu) such that the menu item displays a tree (XamWebTree) through the use of a control template.  (See the XAML code below.  I need to be able to dynamically build the tree at runtime, not at design time, but have been unable to figure out how to programmatically build the menu item tree (in C#) or at least be able to clear and populate the tree at runtime. 

If this can be accomplished, can you post some sample code?

 <igMenu:XamWebMenuItem x:Name="_menuItemProperties" Header="Property" Width="Auto" HorizontalAlignment="Right">

 

 

 

<igMenu:XamWebMenuItem Height="Auto" >

 

 

 

<igMenu:XamWebMenuItem.Template>

 

 

 

<ControlTemplate>

 

 

 

<igTree:XamWebTree>

 

 

 

<igTree:XamWebTreeItem Header="Sample" IsExpanded="True">

 

 

 

<igTree:XamWebTreeItem Header="SampleViewId" />

 

 

 

<igTree:XamWebTreeItem Header="SampleKey"/>

 

 

 

<igTree:XamWebTreeItem Header="LotNr"/>

 

 

 

<igTree:XamWebTreeItem Header="Race"/>

 

 

 

<igTree:XamWebTreeItem Header="Gender"/>

 

 

 

<igTree:XamWebTreeItem Header="Subject Age"/>

 

 

 

</igTree:XamWebTreeItem>

 

 

 

</igTree:XamWebTree>

 

 

 

</ControlTemplate>

 

 

 

</igMenu:XamWebMenuItem.Template>

 

 

 

</igMenu:XamWebMenuItem>

 

 

 

</igMenu:XamWebMenuItem>

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Parents Reply Children
No Data