Using ConventionManager

Topics: Getting Started
Feb 13, 2012 at 8:56 PM
Edited Feb 13, 2012 at 8:57 PM

Hello,

I have some 3rd party spatial components like BingLayer in my WPF application's MapView. These layer components have Initialized event. I want to execute some code in MapViewModel when this Initialized event fires. Currently I am using the code behind for MapView to access code for Initialized event and then I publish event using EventAggregator. I then handle this event in MapViewModel to execute code in MapViewModel as follows-

 

 

  private void OnBingLayerInitialized(object sender, EventArgs e)
        {
            this.Events.Publish(new GenericStringEvent("BingLayerInitialized"));
        }

 

The reason I am doing this is because BingLayer is not a Framework Element and thus CM cannot be used for actions etc. IS there a way using ConventionManager that I can add CM  bindings to it?

 

Thanks

 

Apurva

Feb 14, 2012 at 8:27 PM
Edited Feb 14, 2012 at 8:39 PM

I have similar problem using 3rd party controls like Timeline control for WPF at codeplex. So this timeline control has TimelineReady event. It would be really helpful if someone can help me with using CM with this event.

 

Thanks

 

Apurva