[SOLVED] ListView Image size

Answered Closed
0
0

Hi,

I have a ListView with ViewMode.Details. I can set height of ListViewItem but not the size of Image

ListViewItem listViewItem = new ListViewItem
{
               ImageSource = getImage(message),
               Tag = task.Guid,
               RowHeight = 40
};

Please show me how to set it.

Thanks for your help,

Page

  • You must to post comments
Best Answer
0
0

Hi Page,

You can change the size of the LargeIcon and SmallIcon views with the LargeImageSet and SmallImageSet, respectively.

The way to change the “Details” view icon sizing is a bit different.

 

The first way you can do it is through a Mixin file (add the attached file to /Themes in your project).

The second way is directly in C#, you can add something like this:

 Application.Theme.Appearances.listview.components["grid-cell"].components.icon.states["default"].styles.backgroundSize = "100%";
 Application.Theme.Appearances.listview.components["grid-cell"].components.icon.states["default"].properties.width = "100%";

 

Let me know if this solves your issue!

Best regards,

Levie

  • Page Page
    Thanks you, it works as expected. Page
  • You must to post comments
Showing 1 result