Legend control and itemclick events?

Feb 11, 2014 at 5:55 PM
Hi,

I am new to the library and i am impressed! But - I'll come with my first question...

I like to hook the currently selected layer in the legend to a grid view, thus I have written
an event handler as follows:
    private void legend1_ItemMouseDown(object sender, ItemMouseEventArgs e)
    {
        System.Data.DataTable dt = null;

        if (map1.Layers.Count > 0)
        {
            MapPolygonLayer stateLayer = default(MapPolygonLayer);

            // If selected node is a layer of type MapPolygonLayer, bind data to a grid
But the handler never gets called. Why?

Thanks,

Lothar
Developer
Feb 12, 2014 at 9:02 AM
Hi,
it seems it is a bug - events ItemMouseUp and ItemMouseDown never raised.
But you can use mapFrame.LayerSelected event.

Maxim.