Hi,
I am using XamTileManager. I want all the tiles to be in some default height and width. Then dynamically i can change the tile size. This is my requirement. But once i set the size, i won't be able to resize it. How to do it ?
I am attaching a sample which i used.
Hello Kumaran,
Thank you for your post. I have been reading through it and I can suggest handling the SizeChanged event of the XamTile in order to determine when the size of the tiles is changed. To do that you can create a style without key and add it to the Resources of your XamTileManager. Here is an example on how you can implement this approach:
Xaml:
... <ig:XamTileManager.Resources> <ig:TileConstraints x:Key="tileConst"></ig:TileConstraints> <Style TargetType="{x:Type ig:XamTile}"> <EventSetter Event="SizeChanged" Handler="Tile_SizeChaged"/> </Style> </ig:XamTileManager.Resources> ...
C#:
private void Tile_SizeChaged(object sender, SizeChangedEventArgs e) { //Implement your logic here. }
Please let me know if you need any further assistance on the matter.
Sincerely,
Krasimir
Developer Support Engineer
Infragistics
www.infragistics.com/support
Hi Krasimir,
I tried what you specified in the above reply. But the event doesn't firing. I am attaching the modified sample. Please check...
HI,sorry for the late response from my side, but I can say that currently there is a way for setting PreferredHeight & PreferredWidth for each tile individually. This can be done with the attached property : <ig:XamTileManager.Constraints> for Normal mode. I'm attaching a sample that demostrates this functionality, and may be will be useful for you, I hope.
Regards,
Olga G.
Hi Olga,
Thanks for your response. Checked your sample and it works fine. I think, i can achieve my requirement using this way. Thanks for the solution.
Moreover, can you please check, is this possible to arrange tiles as shown in the below image
Hi, the approach that I have used in my example is to use TileLayoutOrder=HorizontalVariable for Normal mode.If you use TileLayoutOrder=UseExplicitRowColumnOnTile, and specify the exact row and column where the tile has to reside, also its RowSpan, ColumnSpan properties, you will achieve more accurate layout. All these are attached properties.
In this way you will have a better control over the tiles arrangement, and the tiles proportions. Note that you have to use property ExplicitLayoutTileSizeBehavior to define how this layout will be rearranged after you resize a tile.Please, refer to the documentation for XamTileManager to find more about different layouts for normal mode.
I'm a little bit confused about what you are trying to achieve. If your goal is the above layout, then I can try to provide you a simple sample. But you can play with these properties, check the documentation, and find some solution on your own.
I'm looking forward your replay.
Thank you,
The above image is just an sample of layout. Like i may need to layout the tiles in different way and that can be changed into any format and any size. When i use TileLayoutOrder=UseExplicitRowColumnOnTile then i can't resize any tile. But my requirement is, i have to allow the resizing feature with this different kind of layout.
I have been looking into Olga’s sample application and it seems that if you would like to resize the tiles when the ‘TileLayoutOrder’ property is set to “UseExplicitRowColumnOnTile”,you need not to set the ‘HorizontalAlignment’ and ‘VerticalAlignment’ properties of the tiles.
If you need any further assistance, feel free to ask.