Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Shapes ids, diagram dock, and other stuffs (Read 2002 times)
vtortola
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 104
Joined: Nov 26th, 2008
Shapes ids, diagram dock, and other stuffs
Nov 27th, 2008 at 5:19pm
Print Post  
Hi guys,

Is a bit weird that the Shape.Id property is a String with the name of the shape and "MindFusion.Diagramming.Wpf.Shape.Shapes" collection is not indexed by name, only by numeric index. Have I to do a for bucle every time I want to retrieve a specific Shape by name? Is a bit pain  Grin Although I can do a extension method, is there another way to work with that?

Another question... I don't know why... but I'm unable to dock the diagram to the application, I mean, the diagram appears always as A4 sheet... although in the examples the size is variable with the application, I've copied the same code as well but I don't get it, I'm doing something wrong or forgetting something, what could be?

Finally, I'm trying to put ComboBoxes with a small picture of shapes, links, .. etc ... but I'm a bit lazy for take screenshots. I see in one of the examples a NodeListView that looks fine, is there a way to obtain that shape images ?

I'm working in a prototype and is looking pretty good

Cheers. 8)
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Shapes ids, diagram dock, and other stuffs
Reply #1 - Nov 27th, 2008 at 6:01pm
Print Post  
Hi,

Use the static Shape.FromId() method to get a shape by its name.

The diagram size can be set through the Bounds property, and don't forget to add a ScrollViewer as a container for the diagram control.

What you see in the NodeListView are actual ShapeNode objects. They can be added to any container that takes UIElements as its content.

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


I love YaBB 1G - SP1!

Posts: 104
Joined: Nov 26th, 2008
Re: Shapes ids, diagram dock, and other stuffs
Reply #2 - Nov 27th, 2008 at 6:21pm
Print Post  
Ok thanks.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint