示例#1
0
		void InitVisualControl()
		{
			this.NodeVisualControl = new PositionedGraphNodeControl();
			// propagate events from nodeVisualControl
			this.NodeVisualControl.PropertyExpanded += new EventHandler<PositionedPropertyEventArgs>(NodeVisualControl_PropertyExpanded);
			this.NodeVisualControl.PropertyCollapsed += new EventHandler<PositionedPropertyEventArgs>(NodeVisualControl_PropertyCollapsed);
			this.NodeVisualControl.ContentNodeExpanded += new EventHandler<ContentNodeEventArgs>(NodeVisualControl_ContentNodeExpanded);
			this.NodeVisualControl.ContentNodeCollapsed += new EventHandler<ContentNodeEventArgs>(NodeVisualControl_ContentNodeCollapsed);
		}
		private void initVisualControl()
		{
			this.nodeVisualControl = NodeControlCache.Instance.GetNodeControl();
			this.nodeVisualControl.MaxHeight = MaxHeight;
			
			// propagate events from nodeVisualControl
			this.nodeVisualControl.PropertyExpanded += new EventHandler<PositionedPropertyEventArgs>(NodeVisualControl_PropertyExpanded);
			this.nodeVisualControl.PropertyCollapsed += new EventHandler<PositionedPropertyEventArgs>(NodeVisualControl_PropertyCollapsed);
			this.nodeVisualControl.ContentNodeExpanded += new EventHandler<ContentNodeEventArgs>(NodeVisualControl_ContentNodeExpanded);
			this.nodeVisualControl.ContentNodeCollapsed += new EventHandler<ContentNodeEventArgs>(NodeVisualControl_ContentNodeCollapsed);
		}
		public void ReturnForReuse(PositionedGraphNodeControl controlToReuse)
		{
			controls.Push(controlToReuse);
		}
示例#4
0
		public void ReleaseNodeVisualControl()
		{
			this.NodeVisualControl.SetDataContext(null);
			this.NodeVisualControl = null;
		}