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
Size tiles to fill available space.
posted

Is there a good way to setup the tiles control so that each tile get the same size, and the tiles fill the available space?  I'd like a view to come up with 6 tiles (2x3) where each tile is the same size and as the window resizes, the tiles resize.  I was able to achieve this by listening to ActualWidth/ActualHeigh change events, and settings the tile preferred size.  But that falls apart as soon as I resize the tiles individually.

Seems like what I really need is a way to do percentage based tile sizes, much like the Grid.  Is something like this possible?

Also, is there an event in the XamTilesControl to notify me when tiles are being manually resized by the user?

Thanks!

Parents
No Data
Reply
  • 12875
    Verified Answer
    posted

    Hi,

     

    This link will give you some background in the TileLayout settings and their impact.

    http://help.infragistics.com/NetAdvantage/WPF/2010.3/CLR4.0/?page=xamTilesControl_About_Tile_Layout.html

     

    But let me also give you my code for setting the NormalModeSettings.

    <igTiles:XamTilesControl.NormalModeSettings>

         <igTiles:NormalModeSettings

             MaxColumns="3"

             MaxRows="2"                    

             HorizontalTileAreaAlignment="Stretch"

             VerticalTileAreaAlignment="Stretch">                   

             <igTiles:NormalModeSettings.TileConstraints>

                  <igTiles:TileConstraints

                      PreferredHeight="300"

                      PreferredWidth="300" 

                      MaxHeight="400"

                      MaxWidth="400"

                      MinWidth="200"

                      MinHeight="200"

                      />

             </igTiles:NormalModeSettings.TileConstraints>

         </igTiles:NormalModeSettings>

    </igTiles:XamTilesControl.NormalModeSettings>

     

    I set the MaxColumns and MaxRows and the HorizontalTileAreaAlignment and VerticalTileAreaAlignment to control the layout and the force the tiles to fill the form when it is stretched.  Along with that I set the TileConstraints for Preferred and Max and Min width and height to control the size of the tiles.

     

    I’m not quite sure what kind of events you need; what you want to do, but there are a number of Tile events associated with the xamTilesControl (TileDragging, TileClosing, TIleStateChanging).  If you can give me more direction I may be able to be more helpful. 

     

    If you’re interested in animation, this link may help.

    http://help.infragistics.com/NetAdvantage/WPF/2010.3/CLR4.0/?page=xamTilesControl_About_Animations.html

     

    Please let me know if you have further questions.

     

Children