I'm a XAML novice so I apologize if this seems like a a simple question. I have a problem similar to the one described here:
http://www.infragistics.com/community/forums/t/27446.aspx
The difference is that I am dealing with the ApplicationMenu and not a MenuTool. I have the same issue with the LargeImage that the OP had. I have attempted to adapt the code shown in that issue and have been able to show a static image in the correct way but clicking in that area of the menu does not fire the Command that I have bound to the ButtonTool that is displayed to the right of the image. Also, I'm unsure of how to make the image dynamic in the way that my ButtonTools are dynamic. How can I adapt the code show in the example I linked to a) show dynamic images based on a property of my ButtonViewModel and b) link the images to a Command also described in my ButtonViewModel.
Hello Drew,
Thank you for choosing Infragistics.
I have been looking into your issue and I would like to ask you if you would please send me a sample application where the issue is reproduced. Would you also please provide me with some additional information on the behavior you would like to achieve regarding the commands and the images you are using. Having this information would help me further investigate this matter for you.
Hello Tacho,
Thank you for your response. I have created a sample but am unable to upload the zip file. I am getting a 404 error when I push the Save button after browsing to my file. Please advise.
Thanks,
Drew
OK. It seems to work now. I've attached my solution in zip format. The behavior I'm seeing is similar to the post I originally linked to. Namely, the image I specified in the LargeImage attribute of the ButtonTool is showing up small the left of the text in the application menu while the area I expected the image to be is blank. I have used XAML adapted from that original issue and gotten a large image (not the one I want) to show up where I expected the image I specified to LargeImage to be. The behavior I'm looking for is to have the large image bound to the Icon property of my ButtonViewModel similar to how it is bound to the LargeImage attribute of the ButtonTool. In addition, I would like clicking the large image to execute the command that clicking the smaller image/text executes.
Thank you for the information you have provided.
I have been looking into the issue that you have described and I will need some more time to investigate it. I will follow up with my findings as soon as I am ready with my investigation.
Thank you for your patience and understanding.
Sincerely,
Tacho
Infragistics Inc.
www.infragistics.com
I have been looking further into your issue and I have modified the sample application you have provided and I have attached it for you to test it.
I have added an additional ToolMenuItem to the Application menu just for the example. In the ApplicationMenu's Resources of the MainWindowView I have added an EventSetter that handles the Loaded event of each ButtonTool in the ApplicationMenu's ToolMenuItems. In the event I have used the GetAncestorFromType and the GetDescendantFromName static methods of the Utilities class in order to eventually get the ContentPresenter instance that contains the clock image. Finally I have hooked for the PreviewMouseLeftButtonDown event of the ContentPresenter. In that event you should be able to handle your logic in regards to invoking certain commands or any other operation.
If you require any further assistance on this matter, please do not hesitate to ask.
https://filetransfer.infragistics.com/public.php?service=files&t=f6d16e4ad3fc1ad1f2fea267755903ed