I am trying to Generate RadTileViewItem dynamically. It contains RadFluidContentControl which has content textblock and Large content which has ScrollViewer and Stack panel which has to display list of grids dynamically. My code goes like this
private RadTileViewItem BuildTileViewItem(string jobName)
{
RadTileViewItem rdTVItem = new RadTileViewItem();
rdTVItem.Header = jobName;
RadFluidContentControl rdFldContent = new RadFluidContentControl();
rdFldContent.ContentChangeMode =
ContentChangeMode.Manual;
rdFldContent.State =
FluidContentControlState.Normal;
rdFldContent.TransitionDuration =
new TimeSpan(0, 0, 2);
//Small TileItem Content
TextBlock txtBlock = new TextBlock();
txtBlock.Text = jobName;
txtBlock = ItemTextStyle(txtBlock);
Border textBorder = new Border();
textBorder = TileViewItemBorderStyle(textBorder);
textBorder.Child = txtBlock;
rdFldContent.Content = textBorder;
//Large TileItem Content
StackPanel stkPnlJob = new StackPanel();
stkPnlJob.Name =
"stkPnlJob";
ScrollViewer scroll = new ScrollViewer();
scroll.HorizontalScrollBarVisibility =
ScrollBarVisibility.Auto;
scroll.VerticalScrollBarVisibility =
ScrollBarVisibility.Auto;
scroll.HorizontalAlignment = System.Windows.
HorizontalAlignment.Left;
scroll.Name =
"LayoutJobPost";
scroll.Content = stkPnlJob;
Border largeBorder = new Border();
largeBorder = TileViewItemBorderStyle(textBorder);
largeBorder.Child = scroll;
rdFldContent.LargeContent = largeBorder;
rdTVItem.Content = rdFldContent;
return rdTVItem;
}
Its not displaying radTileItem properly. can anyone help solving this problem please.