Hi,
First let me tell you I find the TileView control awesome and I am planning wide use of it for our next iteration. I have a problem though. I need to "inject" UserControls into the Content, SmallContent and LargeContent at runtime because my UserControls are created by Unity (the dependency Injection framework used in PRISM).
I inject the controls in the contructor of the window and it works but when I show the control the app becomes unresponsive and when I pause in the debigger this is where it stops:
Telerik.Windows.Controls.Navigation.dll!Telerik.Windows.Controls.RadFluidContentControl.MeasureOverride(System.Windows.Size availableSize = {System.Windows.Size}) Line 345 + 0x19 bytes.
I tried doing it all in code:
var viewItem = new RadTileViewItem(); |
var content = new RadFluidContentControl(); |
content.SmallToNormalThreshold = new Size(235, 35); |
content.NormalToSmallThreshold = new Size(305, 149); |
content.NormalToLargeThreshold = new Size(315, 155); |
content.LargeToNormalThreshold = new Size(725, 345); |
content.SmallContent = new TextBlock {Text = "Original Data"}; |
content.Content = ResolveControl<OriginalData, UDataTable>(); |
viewItem.Content = content; |
projectData.Items.Add(viewItem); |
And the xaml is:
<telerikNavigation:RadTileView x:Name="projectData" Margin="3"></telerikNavigation:RadTileView>
I also tried a combination of xaml and code using the xaml from your demo app:
The code was something like:
var s = (((projectData.Items[0] as ContentControl).Content) as RadFluidContentControl); |
s.Content = _unityContainer.Resolve<MyUserControl>(); |
I am using the exact xaml from your demo except for the contents which are replaced by this since then cannot be empty:
<telerikNavigation:RadFluidContentControl.Content>
<Data:OriginalData></Data:OriginalData>
</telerikNavigation:RadFluidContentControl.Content>
Finally I tried using a Panel inside the contents and added my usecontrol to the panel but the results were the same.
I must be missing something critical and any help is appreciated,
Jose