hello
I am using Image file in Xamtilemanager.
the image file width height is 320 x 240. (tile normalmode)I want push xamtile maximize button click -> tile maximize -> image file change 1920 x 1080 size. ->if minimize button click-> tile normalmode -> image change 320x240I don't know maximize button and minimize button event trigger help!
Hello Kim,
Thank you for posting to Infragistics Community!
I believe you will find the Restrict a XamTile’s Size topic in our documentation very helpful on the matter.
As you will read there, the tile’s size can be tuned on the control level or for each individual tile with the listed objects and properties. The topic includes sample code of the settings for all tiles. For individual ones, it can look similar to:
<ig:XamTileManager TileStateChanged="XamTileManager_TileStateChanged" > <ig:XamTile Header="Tile 1"> <ig:XamTile.Content> <Image Source="/download.png" Stretch="UniformToFill"></Image> </ig:XamTile.Content> <ig:XamTileManager.ConstraintsMaximized> <ig:TileConstraints MaxHeight="1080" MinHeight="1080" PreferredHeight="1080" MaxWidth="1920" MinWidth="1920" PreferredWidth="1920"></ig:TileConstraints> </ig:XamTileManager.ConstraintsMaximized> <ig:XamTileManager.Constraints> <ig:TileConstraints MaxHeight="240" MinHeight="240" PreferredHeight="240" MaxWidth="320" MinWidth="320" PreferredWidth="320"/> </ig:XamTileManager.Constraints> </ig:XamTile> </ig:XamTileManager>
Should you require applying further settings over the tile contents, such as an image, an event I can suggest using is the TileStateChanged.
Its event arguments expose the Old and New states of type TileState Enumeration and the Tile itself. Based on this information, you could access the Content of the tile, be it images, or any containers and adjust their size, for example:
private void XamTileManager_TileStateChanged(object sender, Infragistics.Controls.Layouts.TileStateChangedEventArgs e) { XamTile tile = e.Tile; object content = tile.Content; var image = content as Image; if(image == null) { return; } if(e.NewState == TileState.Normal) { image.Width = 320; image.Height = 240; } else if (e.NewState == TileState.Maximized || e.NewState == TileState.MinimizedExpanded ) { image.Width = 1920; image.Height = 1080; } }
Attached you will find a sample demonstrating these suggestions. Please, test it on your side and let me know if I can assist you with anything else on the matter.
Best regards,Bozhidara PachilovaAssociate Software Developer
5037.XamTileManagerSample.zip
thank you it works!
Hi Кim,
I am glad that you find my suggestion helpful! Thank you for using Infragistics components!
Best regards, Bozhidara Pachilova