or
<Window x:Class="MenuSample.MainWindow" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" Title="MainWindow" Height="350" Width="525"> <Grid> <telerik:RadMenu VerticalAlignment="Top" x:Name="mainMenu"> <telerik:RadMenuItem Header="File"> <telerik:RadMenuItem Header="Menu1"/> <telerik:RadMenuItem Header="Menu2"/> <telerik:RadMenuItem Header="Menu3"/> </telerik:RadMenuItem> <telerik:RadMenuItem Header="View"> <telerik:RadMenuItem Header="Menu1"/> <telerik:RadMenuItem Header="Menu2"/> <telerik:RadMenuItem Header="Menu3"/> </telerik:RadMenuItem> <telerik:RadMenuItem Header="Help"> <telerik:RadMenuItem Header="Menu1"/> </telerik:RadMenuItem> <telerik:RadMenuItem Header="Help2"> <telerik:RadMenuItem Header="Menu1"/> <telerik:RadMenuItem Header="Menu2"/> </telerik:RadMenuItem> <telerik:RadMenuItem Header="Help3"> <telerik:RadMenuItem Header="Menu1"/> <telerik:RadMenuItem Header="Menu2"/> <telerik:RadMenuItem Header="Menu3"/> </telerik:RadMenuItem> </telerik:RadMenu> </Grid></Window>public class AssetClassLevelViewModel
{
public string AssetClassName {get; set;}
public ObservableCollection<AssetClassLevelViewModel> ChildAssetClasses {get; set;}
public ObservableCollection<ProductHoldingsWithAllocationViewModel> ProductHoldings {get; set;}
}
The ProductHoldingsWithAllocationViewModel has properties such as ProductName etc., which are to be displayed in columns. Attached is a sample of what it should look like.AssetClassLevelViewModel, and each of the Products is represented by the ProductHoldingsWithAllocationViewModel.<Window x:Class="RadGridViewScrollingSample.MainWindow" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" xmlns:local="clr-namespace:RadGridViewScrollingSample" x:Name="_this" Title="MainWindow" Height="350"> <Window.Resources> <BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/> </Window.Resources> <Grid> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> <RowDefinition Height="*"/> <RowDefinition Height="Auto"/> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto"/> <ColumnDefinition Width="*"/> </Grid.ColumnDefinitions> <StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2"> <TextBlock Text='Scroll down in the grid view below then move the mouse over "Place Mouse Here".'/> <TextBlock Text="You will see the grid view automatically scroll to the top."/> <TextBlock Text='Clicking in "Place Mouse Here" will scroll the last row of the grid view in to view, but'/> <TextBlock Text='the grid view will again scroll to the top when the mouse is moved outside "Place Mouse Here".'/> </StackPanel> <telerik:RadGridView x:Name="gridView" Grid.Row="1" Grid.Column="0" ScrollViewer.VerticalScrollBarVisibility="Visible" ItemsSource="{Binding Path=Things}"/> <TextBlock Grid.Row="1" Grid.Column="1" x:Name="placeholder" HorizontalAlignment="Center" VerticalAlignment="Center" TextWrapping="Wrap" TextAlignment="Center" Text="Place Mouse Here" FontSize="40" MouseUp="OnMouseUp"/> <DockPanel Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2"> <TextBlock Text="This is placeholder text. "/> <TextBlock Text='This text appears when the mouse is over "Place Mouse Here".' Visibility="{Binding ElementName=placeholder, Path=IsMouseOver, Converter={StaticResource BooleanToVisibilityConverter}}"/> </DockPanel> </Grid></Window>using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Windows;using System.Windows.Controls;using System.Windows.Data;using System.Windows.Documents;using System.Windows.Input;using System.Windows.Media;using System.Windows.Media.Imaging;using System.Windows.Navigation;using System.Windows.Shapes;using System.Collections.ObjectModel;using System.ComponentModel;namespace RadGridViewScrollingSample{ /// <summary> /// Interaction logic for MainWindow.xaml /// </summary> public partial class MainWindow : Window { private ObservableCollection<Thing> things = new ObservableCollection<Thing>(); private string[] colors = new string[] { "red", "green", "blue", "orange", "purple" }; private string[] sizes = new string[] { "small", "medium", "large" }; public MainWindow() { InitializeComponent(); DataContext = this; int i = 0; for (char c = 'A'; c <= 'Z'; c++, i++) { things.Add(new Thing(c.ToString(), colors[i % colors.Length], sizes[i % sizes.Length])); } } public ObservableCollection<Thing> Things { get { return things; } } private void OnMouseUp(object sender, MouseButtonEventArgs e) { gridView.ScrollIntoView(things.FirstOrDefault(t => t.Name == "Z")); } } public class Thing { private string name; private string color; private string size; public Thing(string name, string color, string size) { this.name = name; this.color = color; this.size = size; } public string Name { get { return name; } } public string Color { get { return color; } } public string Size { get { return size; } } }}