Prism region inside a TileView Item

6 posts, 0 answers
  1. Nick Wood
    Nick Wood avatar
    126 posts
    Member since:
    Feb 2010

    Posted 09 Mar 2010 Link to this post

    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?


  2. Nick Wood
    Nick Wood avatar
    126 posts
    Member since:
    Feb 2010

    Posted 09 Mar 2010 Link to this post

    I fugured this one out. Seems it was better to dynamically load the prism modules.
  3. DevCraft banner
  4. Tihomir Petkov
    Admin
    Tihomir Petkov avatar
    576 posts

    Posted 09 Mar 2010 Link to this post

    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.
  5. Chris Foti
    Chris Foti avatar
    2 posts
    Member since:
    Mar 2010

    Posted 18 Mar 2010 Link to this post

    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!
  6. Tihomir Petkov
    Admin
    Tihomir Petkov avatar
    576 posts

    Posted 22 Mar 2010 Link to this post

    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.
  7. Nick Wood
    Nick Wood avatar
    126 posts
    Member since:
    Feb 2010

    Posted 22 Mar 2010 Link to this post

    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); 




Back to Top
DevCraft banner