Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Context menu in diagram lite (Read 7698 times)
Sachin
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 85
Joined: Mar 14th, 2009
Context menu in diagram lite
Mar 29th, 2009 at 2:43pm
Print Post  
HI

In my application , need to  implement context menu
in this context menu if click next step i need to go another page , back means previous page  with created diagrams. how to achive this one,

Temporary saving functionality is available like viewstae,

regards
sachin
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Context menu in diagram lite
Reply #1 - Mar 30th, 2009 at 7:03am
Print Post  
Hi,

If what you need is to detect right-clicks and display a context menu, check this tip -
http://silverlight.net/blogs/msnow/archive/2008/07/01/tip-of-the-day-14-how-to-r...

Changing pages might be done by keeping several Diagram object around and removing / adding them to the page when needed, or by reusing the same Diagram and calling SaveToString and LoadFromString to save the state as a string, or perhaps SaveToXml and LoadFormXml to save the state in the Silverlight local storage.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Sachin
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 85
Joined: Mar 14th, 2009
Re: Context menu in diagram lite
Reply #2 - Mar 30th, 2009 at 7:14am
Print Post  
HI  stoyo

i did same but while load fromstring method calling time  value cannot be null error

  string s = this.DiagramLight.SaveToString(SaveToStringFormat.Base64);

           this.DiagramLight.LoadFromString(s);

and when i double click the node it should go to the next diagramlite (means new diagramlite );


so node doubleclick event i wrote this.DiagramLight.clearall();

i am gettig error how to solve this one


sachin
  
Back to top
 
IP Logged
 
Sachin
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 85
Joined: Mar 14th, 2009
Re: Context menu in diagram lite
Reply #3 - Mar 30th, 2009 at 9:06am
Print Post  
HI stoyo

If  i am using external control (am adding to diagramlite control ), created diagram , after that savetostring , clear all();

then calling loadfromstring getting value cannot be null only i am using external objects , if i am using shapenode to create diagram then clear and call the load from string it is working , how to solve this one
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Context menu in diagram lite
Reply #4 - Mar 30th, 2009 at 12:51pm
Print Post  
Hi Sachin,

Do you mean you are using ControlNodes with hosted controls? Have you tried handling the SerializeControl and DeserializeControl events?

Stoyan
  
Back to top
 
IP Logged
 
Sachin
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 85
Joined: Mar 14th, 2009
Re: Context menu in diagram lite
Reply #5 - Mar 30th, 2009 at 3:29pm
Print Post  
HI

yes i am using control node to host the control and add to the diagramlight .

afterthat  savetosring method used to sstore the string and loadstring method passing this string

getting Value Cannot be null,
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Context menu in diagram lite
Reply #6 - Mar 31st, 2009 at 10:11am
Print Post  
So, are you handling the SerializeControl and DeserializeControl events?
  
Back to top
 
IP Logged
 
Sachin
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 85
Joined: Mar 14th, 2009
Re: Context menu in diagram lite
Reply #7 - Mar 31st, 2009 at 10:16am
Print Post  
No i am not handling any events
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Context menu in diagram lite
Reply #8 - Mar 31st, 2009 at 10:25am
Print Post  
If the exception stack trace shows it's thrown by the custom control because some of its attributes is not set after loading, you will need to handle these events and save the required attributes.

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