I'm struggling with the RadFluidContentControl and the RadTileView and just can't seem to get it figured out.
I've attached the XAML.
What I'm trying to do is set it up so that I have one template for the minimized version (just an image) and one template for the maximized version (with text and buttons and stuff)
From an earlier post, I took this code and modified it for my needs:
But I get an exception on the line item.ChildrenOfType<>() in the .First() call. It's a "Sequence contains no elements" InvalidOperationException.
I'm really struggling and I'm really new to silverlight, so if my xaml is a mess that's why.
Thanks for any help you can provide.
I've attached the XAML.
What I'm trying to do is set it up so that I have one template for the minimized version (just an image) and one template for the maximized version (with text and buttons and stuff)
From an earlier post, I took this code and modified it for my needs:
private void TileStateChanged(object sender, Telerik.Windows.RadRoutedEventArgs e)
{
RadTileViewItem item = e.Source as RadTileViewItem;
if (item != null)
{
RadFluidContentControl fluidControl = item.ChildrenOfType<RadFluidContentControl>().First();
if (fluidControl != null)
{
switch (item.TileState)
{
case TileViewItemState.Maximized:
fluidControl.State = FluidContentControlState.Normal;
break;
case TileViewItemState.Minimized:
fluidControl.State = FluidContentControlState.Small;
break;
case TileViewItemState.Restored:
fluidControl.State = FluidContentControlState.Normal;
break;
}
}
}
}
But I get an exception on the line item.ChildrenOfType<>() in the .First() call. It's a "Sequence contains no elements" InvalidOperationException.
I'm really struggling and I'm really new to silverlight, so if my xaml is a mess that's why.
Thanks for any help you can provide.