Hi Wisej,
we are widely using the ImageSource property for setting the image for various widgets, however, that does not work for TreeView (and TreeNode). These require the ImageList + ImageKey to be set.
Now, we are having an images mixin file, its attributed as embedded resource.
My idea is to create programatically on-the-fly the ImageList a populate it, at application startup, with images from this mixin. Then share this one image list for all tree views in project. And then, use the ImageKey for TreeNode.
Can you please advice on how to make this happen?
Thank you & regards,
Pavel Weiss
Hi Pavel,
All theme resources are accessible using Application.Theme.
You can add them to an ImageList programatically:
this.imageList1.Images.Add(new ImageListEntry { Name = "myImage" ImageSource = Application.Theme.Images["myImage"] });
HTH,
Levie
Please login first to submit.