Diagram.OnViewMouseEnter Method
Lets derived classes perform an action when the mouse pointer enters the diagram client view.
Namespace: Microsoft.VisualStudio.Modeling.Diagrams
Assembly: Microsoft.VisualStudio.Modeling.Sdk.Diagrams.12.0 (in Microsoft.VisualStudio.Modeling.Sdk.Diagrams.12.0.dll)
Syntax
'Declaration
Public Overridable Sub OnViewMouseEnter ( _
pointArgs As DiagramPointEventArgs _
)
public virtual void OnViewMouseEnter(
DiagramPointEventArgs pointArgs
)
public:
virtual void OnViewMouseEnter(
DiagramPointEventArgs^ pointArgs
)
abstract OnViewMouseEnter :
pointArgs:DiagramPointEventArgs -> unit
override OnViewMouseEnter :
pointArgs:DiagramPointEventArgs -> unit
public function OnViewMouseEnter(
pointArgs : DiagramPointEventArgs
)
Parameters
pointArgs
Type: Microsoft.VisualStudio.Modeling.Diagrams.DiagramPointEventArgsEvent data. For a list of arguments, see DiagramPointEventArgs.
Examples
public override void OnViewMouseEnter(DslDiagrams::DiagramPointEventArgs pointArgs)
{
if (pointArgs == null) throw new global::System.ArgumentNullException("pointArgs");
DslDiagrams::DiagramView activeView = this.ActiveDiagramView;
if(activeView != null)
{
DslDiagrams::MouseAction action = null;
if (activeView.SelectedToolboxItemSupportsFilterString(global::Microsoft.SequenceDiagramModel2.SequenceDiagramModel2ToolboxHelper.SyncMessageFilterString))
{
if (this.syncMessageConnectAction == null)
{
this.syncMessageConnectAction = new global::Microsoft.SequenceDiagramModel2.SyncMessageConnectAction(this);
this.syncMessageConnectAction.MouseActionDeactivated += new DslDiagrams::MouseAction.MouseActionDeactivatedEventHandler(OnConnectActionDeactivated);
}
action = this.syncMessageConnectAction;
}
else if (activeView.SelectedToolboxItemSupportsFilterString(global::Microsoft.SequenceDiagramModel2.SequenceDiagramModel2ToolboxHelper.CreateMessageFilterString))
{
if (this.createMessageConnectAction == null)
{
this.createMessageConnectAction = new global::Microsoft.SequenceDiagramModel2.CreateMessageConnectAction(this);
this.createMessageConnectAction.MouseActionDeactivated += new DslDiagrams::MouseAction.MouseActionDeactivatedEventHandler(OnConnectActionDeactivated);
}
action = this.createMessageConnectAction;
}
else if (activeView.SelectedToolboxItemSupportsFilterString(global::Microsoft.SequenceDiagramModel2.SequenceDiagramModel2ToolboxHelper.AsyncMessageFilterString))
{
if (this.asyncMessageConnectAction == null)
{
this.asyncMessageConnectAction = new global::Microsoft.SequenceDiagramModel2.AsyncMessageConnectAction(this);
this.asyncMessageConnectAction.MouseActionDeactivated += new DslDiagrams::MouseAction.MouseActionDeactivatedEventHandler(OnConnectActionDeactivated);
}
action = this.asyncMessageConnectAction;
}
else
{
action = null;
}
if (pointArgs.DiagramClientView.ActiveMouseAction != action)
{
pointArgs.DiagramClientView.ActiveMouseAction = action;
}
}
}
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.