Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
665
Limiting Tile width
posted

I've got a ContentPane that contains a XamTilesControl with TileLayoutOrder set to UseExplicitRowColumnOnTile.  One of the Tiles contains an ItemsControl that lays out the items horizontally using a WrapPanel.  The behavior I'd like is for the Tile to expand horizontally until reaching the XamTilesControl visible dimensions, at which point a new row would start.  However, that's not what happens.  What I end up with is only 1 row is created for the items and it extends far beyond the visible dimensions of the XamTilesControl.  A horizontal scroll bar is created so I can scroll to view all items in the list.

Is there a way to achieve the layout I'm looking for?  I'm assuming the problem is that everything is auto-sized, so there is no rule in place to prevent the ItemsControl from expanding as far as it needs to so that all items fit.  I've fussed with TileConstraints but I need a more dynamic solution.

Thanks!


Parents
No Data
Reply
  • 7305
    posted

    Hello,

    Is this what you are trying to do,  extending the Tile3 to the remaing available space?

     Tile1  Tile2
     Tile3

    If so, then you would need to explicitly set the row/column positions:

    <

     

    igTile:Tile Header="Tile1" Column="0" Row="0" RowSpan="1" ColumnSpan="1"

    <

     

    igTile:Tile Header="Tile2" Column="1" Row="0" RowSpan="0" ColumnSpan="1"

    <

     

    igTile:Tile Header="Tile3" Column="0" Row="1" RowSpan="2" ColumnSpan="2"

    Sam

Children