Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Getting the Geometry for Shape directly (Read 2858 times)
rajesh_patil74
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 220
Joined: Sep 3rd, 2009
Getting the Geometry for Shape directly
Mar 9th, 2010 at 10:38am
Print Post  
Hi Stoyo

Is it possible to get the ShapeGeometry for the Shape object directly ?

Because, at few places, I need to get the geometry from the Shape itself.

For eq. In the listView, I guess to display shapes, I can use "NodeListView" control which is derived from the ListView.   

At other place, I am displaying my node hierachy in tree View where I can customize the tree node template. In that customized template, before each text I want to display the shape used for that particular item.  Here to I have shapeId available. Using this "ShapeID" I can directly show the shape geometry from the Shape.

Regards
Rajesh
  
Back to top
WWW  
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Getting the Geometry for Shape directly
Reply #1 - Mar 9th, 2010 at 11:50am
Print Post  
Hi Rajesh,

There's the "public Geometry ShapeGeometry" dependency property, and you can see it used in the default ShapeNode template:

Code
Select All
<Path x:Name="Shape"
	Data="{TemplateBinding ShapeGeometry}"
	... 



You could also place ShapeNodes inside the TreeView, just as in the NodeListView. The NodeListView is nothing more than a ListView with a custom template and some drag-and-drop support added.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
rajesh_patil74
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 220
Joined: Sep 3rd, 2009
Re: Getting the Geometry for Shape directly
Reply #2 - Mar 9th, 2010 at 11:58am
Print Post  
Hi Stoyo

Ya. Its true that using "ShapeNode" I can bind the pathGeometry.

Still I guess, It is not a good idea to create ShapeNode objects to get the Geometry of shape and it should be available directly from the Shape object.


If shape gemotry is available directly from the shape, the one can look up in shapedirectionary for required shape and get the geometry directly.

As of now, in my code, I have created ShapeNodes and assign the shape for those shapes and then it is binded.

-Rajesh
  
Back to top
WWW  
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Getting the Geometry for Shape directly
Reply #3 - Mar 9th, 2010 at 3:08pm
Print Post  
Well, if you need it that much, we could make public the Shape method that creates Geometry objects. Then you would be able to bind to the result of that method using an IValueConverter associated with the binding to a shape.

Stoyan
  
Back to top
 
IP Logged
 
rajesh_patil74
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 220
Joined: Sep 3rd, 2009
Re: Getting the Geometry for Shape directly
Reply #4 - Mar 10th, 2010 at 5:23am
Print Post  
Hi Stoyo

Thanks.

When you have plan for releasing the diagram lite version 1.4 with new enhancement?

The above said requirement, I need by end of March or in First week of April 2010.

-Regards
Rajesh
  
Back to top
WWW  
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Getting the Geometry for Shape directly
Reply #5 - Mar 11th, 2010 at 8:48am
Print Post  
Hi,

Check if the Shape.CreateOutlineGeometry method from this version will work for you -
https://mindfusion.eu/_beta/diaglite14_shapegeom.zip

Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint