State and Connectors

Sep 9, 2010 at 1:12 PM

Hi,

I've got some questions

1. In WF 4 State Machine connector XAML i have this

 <UserControl.ContextMenu x:Uid="cxtMenu">

 <ContextMenu>
  <MenuItem Header="Open new window"/>
 </ContextMenu>

right after 

</UserControl.Resources>

However, the context menu that I see is still StateMachineDesigner contextmenu. What is wrong? 

2. For catching mouse double click on connector, there is "OnConnectorMouseDoubleClick", but I can't find something similar for state mouse double click ( I see that it works because it makes the activity visual root). How is this handled?

3. How I determin the activity which has a specific outgoing connector? "GetConnectorModelItem(DependencyObject obj)" returns StateMachine. I'm interested in getting a state somehow

Thank you very much