Infragistics XamOrgChart Events

Topics: Actions & Coroutines, Conventions
Mar 26, 2012 at 11:39 PM

Im trialing the infragistics controls and trying to get the XamOrgChart drag and drop to work with CM. More specifically im trying to attach a method to the NodeControlAttachedEvent. Im using the following syntax - cal:Message.Attach="[Event NodeControlAttachedEvent] = [Action OrgChart_NodeControlAttachedEvent()]". The method in my viewmodel is never called. Any help appreciated...

Mar 27, 2012 at 3:02 AM
Edited Mar 27, 2012 at 3:13 AM

is the viewmodel actually getting instantiated?

you also might want to pass in args to the eventhandler ... OrgChart_NodeControlAttachedEvent($eventArgs)
it according to the docs for that control, has data the control appears to need.

Mar 27, 2012 at 3:03 AM

Yes it is. Theres no problems with the view model. I can get other events to fire such as 'Loaded'. Just cant seem to get the NodeControlAttachedEvent to work

Mar 27, 2012 at 10:34 PM

hmm...  Ok so now it's time to hit the codebehind.  That control doesn't appear to play nice with caliburn.  Another thing you could try before going to code behind to wire up those events is to do a convention to handle Node attachment...

Mar 28, 2012 at 2:56 AM
Edited Mar 28, 2012 at 2:57 AM

Yeah ive got it working in the code behind and then im firing an event with the EventAggregator to pass it on to the ViewModel. Not really happy with that solution. Ive been having a look at the convention manager, but not entirely sure how this works. Im not sure which properties on the XamOrgChart to wire the events too...

Mar 28, 2012 at 4:35 AM

well doing visual stuff on the code behind is ok, shouldn't affect your viewmodel testing if that is what you are worried about.