TileView to take up full screen width and height?

7 posts, 1 answers
  1. madladuk
    madladuk avatar
    126 posts
    Member since:
    Dec 2009

    Posted 05 Jul 2010 Link to this post

    <telerikNavigation:RadTileView x:Name="RadTileView1" Width="1200"  Height="600" 
                        MinimizedColumnWidth="197" 
                         HorizontalAlignment="Center" VerticalAlignment="Center">  
                    <telerikNavigation:RadTileViewItem> 
    Hi. I have a TileView that multiple tile items which are usercontrols. I dont want to set the width of the tileview container as I want this to be the full length of the screen however if I set the width and height to "Auto" then nothing shows. I have to put values in the width and height. Can someone point me in the right direction?

  2. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 08 Jul 2010 Link to this post

    Hello madladuk,

    You can set the HorizontalAlignment and VerticalAlignment properties to Stretch in order to display the TileView stretched on the entire screen. Or you can simply remove the properties since their default value is Stretch.

    Give this approach a try and let me know if this is what you had in mind.

    Sincerely yours,
    Tina Stancheva
    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
  3. DevCraft banner
  4. madladuk
    madladuk avatar
    126 posts
    Member since:
    Dec 2009

    Posted 09 Jul 2010 Link to this post

    Hi, tried that and all it done was to show one of the tiles in the center of the screen and didnt show the second one. When you minimise it, then tile then is not visable. The only way it appears to work is to set an actual width and height. If I remove these then the panel does not show.

    Thanks
    P
  5. Derek Strickland
    Derek Strickland avatar
    5 posts
    Member since:
    May 2010

    Posted 10 Jul 2010 Link to this post

    I have the exact same issue.  Any help would be appreciated.  Additionally, i would like the TileViewItems to not have a fixed width and height but to scale automatically.   
  6. Answer
    Kiril Stanoev
    Admin
    Kiril Stanoev avatar
    1511 posts

    Posted 13 Jul 2010 Link to this post

    Hi Guys,

    If you define your TileView the following way...

    <GridView x:Name="LayoutRoot" Background="White">
        <telerikNavigation:RadTileView x:Name="RadTileView1" Width="Auto" Height="Auto"
                MinimizedColumnWidth="197" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
    </GridView>

    ...TileView will stretch as much as possible. However, please notice that the TileView is placed in a Grid. If you put your TileView in StackPanel...

    <StackPanel x:Name="LayoutRoot" Background="White">
        <telerikNavigation:RadTileView x:Name="RadTileView1" Width="Auto" Height="Auto"
                MinimizedColumnWidth="197" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
    </StackPanel>

    ...you will not be able to see anything. StackPanel gives its children only as much space as they need. Since the Width and Height of RadTileView are Auto, it basically says "Hey StackPanel, you determine how much space I need" and the StackPanel allocates it 0,0. Here is more information on the Silverlight Layout System you might find useful and the panels in it.

    I'm attaching my test project for further reference.

    Sincerely yours,
    Kiril Stanoev
    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. madladuk
    madladuk avatar
    126 posts
    Member since:
    Dec 2009

    Posted 13 Jul 2010 Link to this post

    Many thanks that worked a treat. I found that indeed I did have this within a stackpanel! Grrrr@StackPanels
  8. Jeff Watson
    Jeff Watson avatar
    4 posts
    Member since:
    May 2003

    Posted 09 Sep 2010 Link to this post

    Awesome! I too had my TileView nested inside the StackPanel.  Woot! Feeling much better now!
Back to Top
DevCraft banner