I have a WinTile Panel that I am dynamically loading. I have 4 user controls with some data entry fields, each user control has a width 200. Depending on some form parameters, I am loading 2, 3 or 4 of these controls in tiles and adding the tiles to the WinTilePanel. I want the Tiles to load so that there is no space between the user controls and they are flush left. The WinTilePanel is stretching the tiles to fit, so if I only load two tiles, then there is a large gap, lesser on 3 or 4.
I have tried setting the tiles MaximumSize , but this seems to be ignore and in fact has its own weird behaviour since if I set it and load one tile with one user control, the fields in the user control are no longer aligned left..
I am hacking the behaviour I want by re-setting the WinTilePanel size after all the tiles are added, but there must be built in way to get this obviously desired standard behaviour of having tiles not resize, just added left to right in the panel.
Thanks.
Hello sunibla,
The UltraTilePanel control sets the size of its tiles dynamically. The contained controls in the tiles are being automatically resized to fill up the container area. So if you are trying to set a custom size, it will be overwritten by the control.
As to the gap between the tiles, you could try to 'remove' the space between the user controls by using a CreationFilter. You could read about it at the following link http://help.infragistics.com/Help/NetAdvantage/WinForms/2011.1/CLR2.0/html/Win_Creation_Filter.html.
I would recommend you to be very careful using this approach since it could make some bugs appear in you application. It would be hard for you to keep the layout consistent when you resize tiles and others since you are loading them dinamically.
Please do not hesitate to ask if something comes up.