0
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

pevecg
  • 198
  • 9
Fonka
  • 3
  • 3

1 Answers1

0

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.

pevecg
  • 198
  • 9
  • how do i import the image to the properties/resources folder? – Fonka Jul 26 '22 at 07:14
  • You can follow this quick stack overflow post about it: https://stackoverflow.com/questions/9316549/how-to-add-png-resource-in-visual-studio-2010 Or in text. Go to your solution explorer, expand the project and find Properties, expand that and double click on Resources.resx. A new window in Visual Studio will open, click on the arrow next to Add resource, to bring down an menu then click on New Image – pevecg Jul 26 '22 at 07:20
  • tanks man it worked... know i have to figur out fetching img from database. do you know how? – Fonka Jul 26 '22 at 07:28
  • You will have to look around on stackoverflow for that or ask a new question – pevecg Jul 26 '22 at 07:29