Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic How can i Bind ControlNode BoundsProperty? (Read 3013 times)
chiru29
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 35
Location: Hyderabad
Joined: Jul 16th, 2010
How can i Bind ControlNode BoundsProperty?
Mar 2nd, 2012 at 2:38pm
Print Post  
Hi,

In my object model i have 4 properties like XPosition, YPosition, Width & Height. How can i bind these to ControlNode with Dependency Property? Can i use BoundsProperty?

If possible, Can you please provide me a code snippet for this?

Thanks,
Chiranjeevi
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: How can i Bind ControlNode BoundsProperty?
Reply #1 - Mar 5th, 2012 at 8:10am
Print Post  
Hi,

Such kind of binding is already implemented in the VirtualizingDiagram control.

If you prefer using the Diagram control, you could add a Bounds property to the model that returns Rect(XPosition, YPosition, Width, Height) instance and raise INotifyPropertyChanged.PropertyChanged("Bounds") whenever any of these 4 properties change.

Alternatively, you might try using a multi-binding solution:
http://www.scottlogic.co.uk/blog/colin/2010/05/silverlight-multibinding-solution...

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


I love YaBB 1G - SP1!

Posts: 35
Location: Hyderabad
Joined: Jul 16th, 2010
Re: How can i Bind ControlNode BoundsProperty?
Reply #2 - Mar 5th, 2012 at 1:37pm
Print Post  
Thanks Stoyon. I will try this.


thanks,
Chiru
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint