Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Some way to position the grid on screen? (Read 1014 times)
PDM.
Senior Member
****
Offline


I love YaBB 1G - SP1!

Posts: 256
Joined: Dec 2nd, 2010
Some way to position the grid on screen?
Jul 10th, 2014 at 8:23pm
Print Post  

Exist some way to make the align grid start form some specifc position of the screen.

Example start form 100pixels X 100 pixels Y
And also define the point where the grid finsih in X Y ?

Im talking square align grid.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Some way to position the grid on screen?
Reply #1 - Jul 11th, 2014 at 7:45am
Print Post  
That's possible only by overriding the DrawGrid method of Diagram, and either drawing the points yourself via WPF's DrawingContext, or by applying a clip rectangle before calling base:

Code
Select All
public class MyDiagram : Diagram
{
	protected override void DrawGrid(DrawingContext graphics)
	{
		graphics.PushClip(
			new RectangleGeometry(
				new Rect(100, 100, Bounds.Width - 200, Bounds.Height - 200)));

		base.DrawGrid(graphics);

		graphics.Pop();
	}
} 



I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint