How should I change a PopupMenuTool image at runtime? I tried setting the CustomizedImage property and this seemed to work initially, but has now stopped working for some reason. :(
What I actually want to do is assign the icon for the currently selected menu item (from it's children), but at the moment I can't actually find a way to get this image from the child item either, which is a StateButtonTool, so I have been assigning the actual resource image used instead, but this is less flexible and harder to maintain.
Any help on either problem is appreciated.
Brian
brian_h said:How should I change a PopupMenuTool image at runtime? I tried setting the CustomizedImage property and this seemed to work initially, but has now stopped working for some reason. :(
This might be a bug. I would recommend submitting the issue to the support group: http://ko.infragistics.com/gethelp. As a workaround, you can set the Image on the appropriate Appearance... property on the InstanceProps of the tool.
brian_h said:What I actually want to do is assign the icon for the currently selected menu item (from it's children), but at the moment I can't actually find a way to get this image from the child item either, which is a StateButtonTool, so I have been assigning the actual resource image used instead, but this is less flexible and harder to maintain.
The best way to get the actual image used for an instance of a tool is to call one of the ResolveAppearance methods on it and get the Image from the resolved appearance:
AppearanceData appearanceData = new AppearanceData();popupMenuTool.Tools[0].ResolveAppearance(ref appearanceData);Image image = appearanceData.Image as Image;
if(image != null){ // ...}
Hi Mike,
I've got the same problem as brian_h but can't seem to get the popup menu tool change the image even with your hint of using the InstanceProps.Appearance instead.
I also tried using SharedProps to set the image with no luck either.
I'm using version 2008 Vol 3.
Any hint, why it won't change?
Regards,
Matthias