Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic i will add the MindFusion.Gauges demos into the diagram,how can i do? (Read 3136 times)
Joe
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 21
Joined: Jun 6th, 2012
i will add the MindFusion.Gauges demos into the diagram,how can i do?
Jan 16th, 2013 at 7:53am
Print Post  
i will add the  MindFusion.Gauges demos into the diagram,how can i do?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: i will add the MindFusion.Gauges demos into the diagram,how can i do?
Reply #1 - Jan 16th, 2013 at 8:51am
Print Post  
Check the GaugeDiagramNodes sample project installed with the MindFusion.WPF pack:
https://mindfusion.eu/WpfPackTrial.zip

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Joe
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 21
Joined: Jun 6th, 2012
Re: i will add the MindFusion.Gauges demos into the diagram,how can i do?
Reply #2 - Jan 16th, 2013 at 9:34am
Print Post  
I want to make each sample as a node  inserted into the diagram. how can i do?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: i will add the MindFusion.Gauges demos into the diagram,how can i do?
Reply #3 - Jan 16th, 2013 at 9:36am
Print Post  
You can add any UIElement -derived object to Diagram.Nodes, which creates automatically a DiagramNodeAdapter for it, e.g. call

diag.Nodes.Add(sampleGaugeInstance);

or

diag.Nodes.Add(new DiagramNodeAdapter(sampleGaugeInstance));

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Joe
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 21
Joined: Jun 6th, 2012
Re: i will add the MindFusion.Gauges demos into the diagram,how can i do?
Reply #4 - Jan 18th, 2013 at 1:39am
Print Post  
if i user the diag.Nodes.Add(new DiagramNodeAdapter(sampleGaugeInstance)), when save diagram to xml then throw exception :Cannot serialize a generic class “System.Collections.ObjectModel.ObservableCollection`1[MindFusion.Gauges.Wpf.Range]”。
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: i will add the MindFusion.Gauges demos into the diagram,how can i do?
Reply #5 - Jan 18th, 2013 at 6:43am
Print Post  
If the diagram can't save some controls automatically, you will have to handle the SerializeControl and DeserializeControl events to implement custom serialization, or use a gauge node class with SaveToXml and LoadFromXml methods as in the sample project from the pack.

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