ComponentClonedMessage

Hello all!

I couldn’t find out on how to subscribe to the ComponentClonedMessage, when I want to get informed, when a component is being pasted/cloned in 3d world?

Does anybody has already used this class?

Thank you for your help!

Best regards,

Manuel

You need to use the IEventAggregator and caliburn micro way of of listening to messages:
Example:

public class MyClass: IHandle<ComponentClonedMessage>
{
    public MyClass() 
    {
        IEventAggregator eventAggregator = IoC.Get<IEventAggregator>();
        eventAggregator.Subscribe(this);
    }

    public void Handle(ComponentClonedMessage message)
    {
        // your logic here
    }
}
2 Likes