C# 클래스 Smrf.NodeXL.Visualization.Wpf.GraphDrawer

Draws a NodeXL graph onto a collection of Visual objects.
This is used to draw a NodeXL graph in a WPF application. It contains a collection of Visual objects that represent the graph's vertices and edges. Call DrawGraph to draw a laid-out NodeXL graph onto the contained GraphDrawer.VisualCollection.

GraphDrawer does not lay out the graph. You should lay out the graph using one of the provided layout classes before calling .

A GraphDrawer cannot be directly rendered and is typically not used directly by an application. Applications typically use one of two other NodeXL graph-drawing classes:

NodeXLControl, which is a FrameworkElement that wraps a and hosts its . NodeXLControl is meant for use in WPF desktop applications. It automatically lays out the graph before drawing it. NodeXLVisual, which is a Visual that wraps a and hosts its . This is a lower-level alternative to NodeXLControl and can be used anywhere a Visual is more appropriate than a FrameworkElement. Like GraphDrawer, does not lay out the graph before drawing it.

If you do use GraphDrawer directly, rendering the graph requires a custom wrapper that hosts the GraphDrawer. object.

상속: DrawerBase
파일 보기 프로젝트 열기: 2014-sed-team3/term-project 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
m_oAllVertexDrawingVisuals System.Windows.Media.DrawingVisual
m_oBackColor Color
m_oBackgroundImage ImageSource
m_oEdgeDrawer EdgeDrawer
m_oGroupDrawer GroupDrawer
m_oSelectedEdgeDrawingVisuals DrawingVisual
m_oUnselectedEdgeDrawingVisuals DrawingVisual
m_oVertexDrawer VertexDrawer
m_oVisualCollection VisualCollection

공개 메소드들

메소드 설명
AddVisualOnTopOfGraph ( Visual visual ) : void
AssertValid ( ) : void
DrawGraph ( IGraph graph, GraphDrawingContext graphDrawingContext ) : void
DrawNewEdge ( IEdge newEdge, GraphDrawingContext graphDrawingContext ) : void
DrawNewVertex ( IVertex newVertex, GraphDrawingContext graphDrawingContext ) : void
GetVerticesFromRectangle ( Rect rectangle ) : ICollection
GraphDrawer ( Visual parentVisual ) : System

Initializes a new instance of the GraphDrawer class.

RedrawEdge ( IEdge edge, GraphDrawingContext graphDrawingContext ) : void
RedrawVertex ( IVertex vertex, GraphDrawingContext graphDrawingContext ) : void
RemoveVisualFromTopOfGraph ( Visual visual ) : void
TryGetVertexFromPoint ( Point point, IVertex &vertex ) : System.Boolean
UndrawEdge ( IEdge edge, GraphDrawingContext graphDrawingContext ) : void
UndrawVertex ( IVertex vertex, GraphDrawingContext graphDrawingContext ) : void

보호된 메소드들

메소드 설명
DrawBackground ( IGraph oGraph, GraphDrawingContext oGraphDrawingContext ) : void
DrawEdge ( IEdge oEdge, GraphDrawingContext oGraphDrawingContext ) : void
DrawVertex ( IVertex oVertex, GraphDrawingContext oGraphDrawingContext ) : void
GetEdgeDrawingVisuals ( EdgeDrawingHistory oEdgeDrawingHistory ) : System.Windows.Media.DrawingVisual
GetVerticesToDraw ( IGraph oGraph ) : ICollection
RetrieveVertexFromDrawingVisual ( System.Windows.Media.DrawingVisual oDrawingVisual ) : IVertex
SaveVertexOnDrawingVisual ( IVertex oVertex, System.Windows.Media.DrawingVisual oDrawingVisual ) : void

메소드 상세

AddVisualOnTopOfGraph() 공개 메소드

public AddVisualOnTopOfGraph ( Visual visual ) : void
visual Visual
리턴 void

AssertValid() 공개 메소드

public AssertValid ( ) : void
리턴 void

DrawBackground() 보호된 메소드

protected DrawBackground ( IGraph oGraph, GraphDrawingContext oGraphDrawingContext ) : void
oGraph IGraph
oGraphDrawingContext GraphDrawingContext
리턴 void

DrawEdge() 보호된 메소드

protected DrawEdge ( IEdge oEdge, GraphDrawingContext oGraphDrawingContext ) : void
oEdge IEdge
oGraphDrawingContext GraphDrawingContext
리턴 void

DrawGraph() 공개 메소드

public DrawGraph ( IGraph graph, GraphDrawingContext graphDrawingContext ) : void
graph IGraph
graphDrawingContext GraphDrawingContext
리턴 void

DrawNewEdge() 공개 메소드

public DrawNewEdge ( IEdge newEdge, GraphDrawingContext graphDrawingContext ) : void
newEdge IEdge
graphDrawingContext GraphDrawingContext
리턴 void

DrawNewVertex() 공개 메소드

public DrawNewVertex ( IVertex newVertex, GraphDrawingContext graphDrawingContext ) : void
newVertex IVertex
graphDrawingContext GraphDrawingContext
리턴 void

DrawVertex() 보호된 메소드

protected DrawVertex ( IVertex oVertex, GraphDrawingContext oGraphDrawingContext ) : void
oVertex IVertex
oGraphDrawingContext GraphDrawingContext
리턴 void

GetEdgeDrawingVisuals() 보호된 메소드

protected GetEdgeDrawingVisuals ( EdgeDrawingHistory oEdgeDrawingHistory ) : System.Windows.Media.DrawingVisual
oEdgeDrawingHistory EdgeDrawingHistory
리턴 System.Windows.Media.DrawingVisual

GetVerticesFromRectangle() 공개 메소드

public GetVerticesFromRectangle ( Rect rectangle ) : ICollection
rectangle System.Windows.Rect
리턴 ICollection

GetVerticesToDraw() 보호된 메소드

protected GetVerticesToDraw ( IGraph oGraph ) : ICollection
oGraph IGraph
리턴 ICollection

GraphDrawer() 공개 메소드

Initializes a new instance of the GraphDrawer class.
public GraphDrawer ( Visual parentVisual ) : System
parentVisual Visual /// The parent of the contained . This is usually a /// FrameworkElement that is hosting the collection. ///
리턴 System

RedrawEdge() 공개 메소드

public RedrawEdge ( IEdge edge, GraphDrawingContext graphDrawingContext ) : void
edge IEdge
graphDrawingContext GraphDrawingContext
리턴 void

RedrawVertex() 공개 메소드

public RedrawVertex ( IVertex vertex, GraphDrawingContext graphDrawingContext ) : void
vertex IVertex
graphDrawingContext GraphDrawingContext
리턴 void

RemoveVisualFromTopOfGraph() 공개 메소드

public RemoveVisualFromTopOfGraph ( Visual visual ) : void
visual Visual
리턴 void

RetrieveVertexFromDrawingVisual() 보호된 메소드

protected RetrieveVertexFromDrawingVisual ( System.Windows.Media.DrawingVisual oDrawingVisual ) : IVertex
oDrawingVisual System.Windows.Media.DrawingVisual
리턴 IVertex

SaveVertexOnDrawingVisual() 보호된 메소드

protected SaveVertexOnDrawingVisual ( IVertex oVertex, System.Windows.Media.DrawingVisual oDrawingVisual ) : void
oVertex IVertex
oDrawingVisual System.Windows.Media.DrawingVisual
리턴 void

TryGetVertexFromPoint() 공개 메소드

public TryGetVertexFromPoint ( Point point, IVertex &vertex ) : System.Boolean
point Point
vertex IVertex
리턴 System.Boolean

UndrawEdge() 공개 메소드

public UndrawEdge ( IEdge edge, GraphDrawingContext graphDrawingContext ) : void
edge IEdge
graphDrawingContext GraphDrawingContext
리턴 void

UndrawVertex() 공개 메소드

public UndrawVertex ( IVertex vertex, GraphDrawingContext graphDrawingContext ) : void
vertex IVertex
graphDrawingContext GraphDrawingContext
리턴 void

프로퍼티 상세

m_oAllVertexDrawingVisuals 보호되어 있는 프로퍼티

protected DrawingVisual,System.Windows.Media m_oAllVertexDrawingVisuals
리턴 System.Windows.Media.DrawingVisual

m_oBackColor 보호되어 있는 프로퍼티

protected Color m_oBackColor
리턴 Color

m_oBackgroundImage 보호되어 있는 프로퍼티

protected ImageSource m_oBackgroundImage
리턴 ImageSource

m_oEdgeDrawer 보호되어 있는 프로퍼티

protected EdgeDrawer m_oEdgeDrawer
리턴 EdgeDrawer

m_oGroupDrawer 보호되어 있는 프로퍼티

protected GroupDrawer m_oGroupDrawer
리턴 GroupDrawer

m_oSelectedEdgeDrawingVisuals 보호되어 있는 프로퍼티

protected DrawingVisual m_oSelectedEdgeDrawingVisuals
리턴 DrawingVisual

m_oUnselectedEdgeDrawingVisuals 보호되어 있는 프로퍼티

protected DrawingVisual m_oUnselectedEdgeDrawingVisuals
리턴 DrawingVisual

m_oVertexDrawer 보호되어 있는 프로퍼티

protected VertexDrawer m_oVertexDrawer
리턴 VertexDrawer

m_oVisualCollection 보호되어 있는 프로퍼티

protected VisualCollection m_oVisualCollection
리턴 VisualCollection