I would like to create a custom legend for the XamChart.I need the legend to appear as an icon and the legend data will be shown as tool-tip(see attachment) when the mouse is above the icon. Does any one have an example of a similar solution?
Thanks,
Yevgeni
It worked for me ,
Thanks for all the help.
Hello Yevgeni,
I am just checking if my last reply was helpful for you.
If you require any further assistance please do not hesitate to ask.
Sincerely,
Krasimir
Developer Support Engineer
Infragistics
www.infragistics.com/support
I have modified the sample application that I have attached with my previous reply in order to use a Popup instead of a ToolTip, and the result seems to be similar. It seems that when the UseDataTemplate is set to False, the calculated width of the Legend’s items is not absolutely accurate, so I can suggest using a DataTemplate for the Legend’s items.
Please let me know if the sample application with the modifications that I have made to it, suits your scenario.
Looking forward to hearing from you.
I have addaed your style as is and i still see the same problem with the tooltip. The funy thing is that in the ContentPresenter_Loaded function I see that the content contains all the visual objects. May be the problem related to the fact that I use the graph as a user control. Any ideas? Maybe you can modify the example to show a popup instead of the tooltip?
Hello Yegeni,
I have created a sample application using the code snippet that you have sent. I have changed the handler for Loaded event for the ContentPresenter in the template for the Legend. The Legend in the sample application that I have send you earlier in our discussion has its UseDataTemplate property set to true and in your code snippet this property is not set and it seems that is causing the issue that you are having.
If you need any further assistance please do not hesitate to ask.