This is a migrated thread and some comments may be shown as answers.

Prism region inside a TileView Item

5 Answers 118 Views
TileView
This is a migrated thread and some comments may be shown as answers.
Nick Wood
Top achievements
Rank 1
Nick Wood asked on 09 Mar 2010, 06:50 AM
Hi All

I have managed to impliment prism modules inside of a RadCoverFlow control and this is working well. I want to attempt to add the modules inside RadTileView, for example:
<telerik:RadFluidContentControl.LargeContent> 
                                <ItemsControl x:Name="LayoutReportInteractionRegion" 
                                       Width="700" Height="300" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"  
                                       Regions:RegionManager.RegionName="LayoutReportInteractionRegion"
 
                                    <ItemsControl.ItemsPanel> 
                                        <ItemsPanelTemplate> 
                                            <Grid/> 
                                        </ItemsPanelTemplate> 
                                    </ItemsControl.ItemsPanel> 
                                </ItemsControl> 
                            </telerik:RadFluidContentControl.LargeContent> 

The issue i have is that at runtime, the app cannot find the LayoutReportInteractionRegion region.

Can anyone tell me a reason why this might be?


5 Answers, 1 is accepted

Sort by
0
Nick Wood
Top achievements
Rank 1
answered on 09 Mar 2010, 01:42 PM
I fugured this one out. Seems it was better to dynamically load the prism modules.
0
Tihomir Petkov
Telerik team
answered on 09 Mar 2010, 04:39 PM
Hello Nick,

I'm glad you managed to resolve your problem. The most probable reason was that you were deifning a Prism region in the LargeContent of a FluidContentControl, and that content was not visible at the time when you needed to inject a View in it.

All the best,
Tihomir Petkov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Chris Foti
Top achievements
Rank 1
answered on 18 Mar 2010, 07:13 PM
Hi Everyone,

I am encountering this same issue and I'm having trouble getting it to work.

What I'm trying to do is define a Region in only the Large Content section of a RadFluidContentControl. In the Small and Normal Regions I just want to display an Image and/or text. I would like to inject a view with a custom user control into the region that exists in the Large Content section after a user expands the TileViewItem.

Every time I try to expand a TileView Item so that I can inject the region with my user control I get an error stating that The region manager does not contain the region I defined in the Large Content section.

Here is the code that I have in my XAML to define the TileViewItem's content:

<telerikNavigation:RadTileViewItem.Content> 
                        <telerik:RadFluidContentControl SmallToNormalThreshold="190, 40" 
                                NormalToSmallThreshold="190, 40" NormalToLargeThreshold="300, 160" 
                                LargeToNormalThreshold="300, 160">  
                            <telerik:RadFluidContentControl.SmallContent> 
                                <Border Width="193" Height="30">  
                                    <Image  Width="16" Height="16" Source="/Somepath/someimage.png" /> 
                                </Border> 
                            </telerik:RadFluidContentControl.SmallContent> 
                            <telerik:RadFluidContentControl.Content> 
                                <Border Width="279" Height="130">  
                                    <TextBlock Text="SomeText" Style="{StaticResource SmallBox}"/>  
                                </Border> 
                            </telerik:RadFluidContentControl.Content> 
                            <telerik:RadFluidContentControl.LargeContent> 
                                <Border Width="735" Height="355">  
                                    <ItemsControl   Regions:RegionManager.RegionName="MyRegion"   
                             Background="Yellow" Width="735" Height="355" 
                             HorizontalAlignment="Stretch" VerticalAlignment="Stretch" BorderThickness="0" Style="{StaticResource ItemsControlStyle}"  > 
 
                                    </ItemsControl> 
                                     
                                </Border> 
                            </telerik:RadFluidContentControl.LargeContent> 
                            </telerik:RadFluidContentControl> 
                    </telerikNavigation:RadTileViewItem.Content> 

Initially I tried injecting the view into the region after the TileView Control Loaded, but before the Large Content was visible, and I got the same error mentioned above.

After that, I tried Binding a property in my viewmodel to the TileViewItem's TileState property. Inside my viewmodel I checked to see if the property was being set to "Maximize". If it was, I published an event requesting that the view be injected into the region. I ran my application, expanded the TileViewItem and I was able to hit the breakpoint in my property in my viewmodel. The property was indeed, being set to "Maximize", so it fired off my event requesting the view to be injected into the region, and again I got the same error mentioned above.

Finally, I added a button to the screen that would publish an event to inject the view into the region after it had been pressed. I started up the project, Maximized the TileViewItem so the Region should be there, and then hit the button, but I'm still getting the same error.

I'm at a loss for what I should try doing next. It appears the original poster here found a solution to this problem, but doesn't really describe what it is. Any help would be greatly appreciated!
0
Tihomir Petkov
Telerik team
answered on 22 Mar 2010, 01:58 PM
Hi Chris,

Can you please check if the threshold values you use are actually suitable for the layout of your application? You can do so by substituting the element that defines your Prism region with a static element (i.e. Rectangle) and see if it is displayed when the tile is maximized. It is possible that the value of the NormalToLargeThreshold is not suitable and the region element is never displayed.

If the above suggestion doesn't help, I can either prepare a sample project that defines a region in the LargeContent of aRadFluidContentControl, or you can send me your application so that I investigate the problem there.

Greetings,
Tihomir Petkov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Nick Wood
Top achievements
Rank 1
answered on 22 Mar 2010, 11:11 PM
Hi Chris

In my instance it was not the region, but the way in which I injected the module into the region.

Here is what fixed the problem:
var addView = this.container.Resolve<ReportsMainView>(); 
            this.regionManager.Regions["ReportRegion"].Add(addView); 




Tags
TileView
Asked by
Nick Wood
Top achievements
Rank 1
Answers by
Nick Wood
Top achievements
Rank 1
Tihomir Petkov
Telerik team
Chris Foti
Top achievements
Rank 1
Share this question
or