Tile View shrinks the content - Prism

8 posts, 1 answers
  1. scorp
    scorp avatar
    59 posts
    Member since:
    Dec 2010

    Posted 19 Jan 2011 Link to this post

    Hi is there a way I can show 100% of the content of the control when it is in minimized state.

    This is what I have in the shell
      <telerik:RadTileView Name="radTileView1" MaximizeMode="ZeroOrOne" MinimizedItemsPosition="Left">
                            <telerik:RadTileViewItem Header="Region1" Regions:RegionManager.RegionName="Region1"/>
                            <telerik:RadTileViewItem Header="Region2" Regions:RegionManager.RegionName="Region2"/>
                            <telerik:RadTileViewItem Header="Region3" Regions:RegionManager.RegionName="Region3"/>
                        </telerik:RadTileView>
    However in the minimized tile view state I would like the tileview to display all of the content and not just a part of it. There needs to be some sort of scaling down as the original page is bigger than what fits into the tile.
    Thanks.
  2. scorp
    scorp avatar
    59 posts
    Member since:
    Dec 2010

    Posted 19 Jan 2011 Link to this post

    I was able to get 100% content by specifying MaxHeight and MaxWidth properties in my Views instead of explicitly specifying the height and width.
    After accomplishing this I came across another issue where when I resize the grid control in which the radTileView resides on minimize and maximize operations in the code behind the animation of the radTileView looks messed up and the tiles are at random positions.
    This problem goes away when IsItemsAnimationEnabled is set to "False" however at the cost of losing the animation. 
    Thanks.
  3. DevCraft banner
  4. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 24 Jan 2011 Link to this post

    Hello scorp,

    Unfortunately, we couldn't reproduce the issue on our side. Therefore I wanted to ask you if you can isolate it in a small project and send it to us so that we can further investigate it.

    Thank you in advance.

    Regards,
    Tina Stancheva
    the Telerik team
    Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
  5. scorp
    scorp avatar
    59 posts
    Member since:
    Dec 2010

    Posted 24 Jan 2011 Link to this post

    I have uploaded a small sample project replicating the problem.
    https://www.yousendit.com/download/bFlHTG13YTI5bEEwTVE9PQ
  6. Answer
    Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 27 Jan 2011 Link to this post

    Hello scorp,

    Please excuse me for misunderstaing you in my last post ( it`s removed already).
    You can use some of the latest control versions (newer than 1220.1040) and Dispatcher like so:
    private void myTileView_TilesStateChanged(object sender, Telerik.Windows.RadRoutedEventArgs e)
            {
                RadTileView tileViewItem = e.OriginalSource as RadTileView;
                RadTileViewItem rdItem = tileViewItem.MaximizedItem as RadTileViewItem;
      
                if (rdItem == null)
                {
                    MainGrid.Height = 500;
                    this.Dispatcher.BeginInvoke(new Action(() =>
                    {
                        tileViewItem.UpdateItemsSizeAndPosition();
                    }));
                }
                else if (rdItem.TileState == TileViewItemState.Maximized)
                {
                    MainGrid.Height = 300;
                }        
            }
    Feel free to ask if you need further assistance.


    All the best,
    Petar Mladenov
    the Telerik team
    Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
  7. scorp
    scorp avatar
    59 posts
    Member since:
    Dec 2010

    Posted 27 Jan 2011 Link to this post

    Thanks for the reply. This seems to have corrected almost all issues except I get this exception message frequently while minimizing and maximizing:
    Microsoft JScript runtime error: Unhandled Error in Silverlight Application 
    Code: 4004    
    Category: ManagedRuntimeError       
    Message: System.Windows.LayoutCycleException: Layout cycle detected.  Layout could not complete.
       at MS.Internal.XcpImports.MethodEx(IntPtr ptr, String name, CValue[] cvData)
       at MS.Internal.XcpImports.MethodEx(DependencyObject obj, String name)
       at System.Windows.UIElement.UpdateLayout()
       at Telerik.Windows.Controls.RadTileView.DetermineScrollBarVisibility(RadTileViewItem maximizedItem)
       at Telerik.Windows.Controls.RadTileView.<UpdateScrollBar>b__58()     


    I am using version 2010.3.1110.1040
    Is there any version newer than this and if that would resolve the issue.
  8. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 28 Jan 2011 Link to this post

    Hello scorp,

    We are unable to reproduce the issue you have described using the 1110.1040 version of the dlls. Could you please examine the attached project and let us know if we are missing something? You can modify it, or you can send us another sample showing the issue. You can also send us a video. Thank you for your cooperation.

    Regards,
    Petar Mladenov
    the Telerik team
    Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
  9. scorp
    scorp avatar
    59 posts
    Member since:
    Dec 2010

    Posted 01 Feb 2011 Link to this post

    I am unable to recreate the problem after I restarted my computer recently. Will let you know if I come across the same problem again.

    2/3/2011:
    I was able to recreate the issue however I tried the workaround as mentioned on this post and the problem went away.
    http://www.telerik.com/community/forums/silverlight/tileview/layoutcycleexception-with-radcharts.aspx
Back to Top
DevCraft banner