This project is read-only.

How to customize the legend?

Oct 30, 2009 at 5:40 AM

I would like to change the background of the legend item on mouse over and trigger a command when the user click on a legend item.

How do I do that?

Nov 2, 2009 at 7:09 AM


you can insert the following code somewhere in the Legend.cs:


public Panel ContentPanel
     get { return stackPanel; }

This will enable you to have access to StackPanel that contains Legend's elements, which are of type LegendItem : ContentControl.

Next changeset will contain this change, too.


Nov 3, 2009 at 12:29 AM

Thanks! :-)

Dec 2, 2009 at 6:22 PM

Hi Mikhail,

What is the recommended way, in your opinion, to change the LegendItems to be checkboxes, allowing the user to turn series on/off?   Or should I just create my own legend of checkbox items, each corresponding to a data series?  It would be easy for me to do this, but if there is some built-in mechanism which I have missed, I thought I'd ask.

Thanks very much!



Dec 10, 2009 at 3:16 PM


currently our legend doesn't allow such changes, and though we are developing new legend which will allow changing its items' templates, but it is not ready yet,

so it would be quicker for you to create your own solution.

Best regards,


Dec 10, 2009 at 4:02 PM

Sounds good.

I just dynamically created as many checkboxes are there are series in my plotter and switched the Visibility as the checkboxes are toggled.

Thanks for the response.