Home > Software design >  How to add Image to tileItemElement in a tilecontrol Winforms without the GUI interface in the .NET
How to add Image to tileItemElement in a tilecontrol Winforms without the GUI interface in the .NET

Time:07-26

tileItemElement5.ImageAlignment = DevExpress.XtraEditors.TileItemContentAlignment.TopCenter;
tileItemElement5.ImageScaleMode = DevExpress.XtraEditors.TileItemImageScaleMode.ZoomInside;
tileItemElement5.ImageSize = new System.Drawing.Size(200, 135);

Here I want to assign an image to my tileItemElement5. I don't know how to do that

CodePudding user response:

Looking at the documentation for DevExpress WinForms, you can just assign an image directly to the TileItemElement.

tileItemElement.Image = Properties.Resources.delete_icon;

You can get the image from your Properties/Resources as I did in the short example, or load it in code.

Link to the documentation and a tip

DevExpress provides a very detailed documentation with lots of examples, I recommend that you utilize your search engine next time because 99% of the time, you will find an answer on their website.

Because DevExpress provides libraries for multiple platforms and frameworks, I recommend that you preface your search engine search with "DevExpress C# WinForm" then type in the issue or what you are looking for. This will make sure that you get results that match your development environment.

  • Related