Image Configuration in EJ 1 ASP.NET MVC Tile
19 Jul 2016 / 1 minute to read
ImagePosition property is used to adjust the position of Tile image at the Center on initialization. The possible values for the ImagePosition are as follows
- Center
- TopCenter
- BottomCenter
- RightCenter
- LeftCenter
- TopLeft
- TopRight
- BottomRight
- BottomLeft
- Fill
ImageUrl property is used to set the background image for Tile, where the image is given in the path specified by ImageUrl property.
Refer to the following code examples.
@Html.EJ().Tile("tile").Text("Weather").ImagePosition(TileImagePosition.Center).TileSize(TileSize.Wide).ImageUrl("http://js.syncfusion.com/UG/web/Content/tile/Weather_2.png ")
You can give images for each tile through CSS classes by using ImageClass property. You can define your desired styles in the specified class.
Refer to the following code examples.
@Html.EJ().Tile("tile").Text("Pictures").ImagePosition(TileImagePosition.Center).TileSize(TileSize.Medium).ImageClass("pictures")
<style>
.pictures
{
background: url("http://js.syncfusion.com/UG/web/Content/tile/pictures.png ");
background-size:30px 30px;
}
</style>
Was this page helpful?
Yes
No
Thank you for your feedback!
Thank you for your feedback and comments. We will rectify this as soon as possible!
An unknown error has occurred. Please try again.
Help us improve this page