Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Container properties and event (Read 2877 times)
Jan Lyson
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 26
Joined: Dec 4th, 2019
Container properties and event
Apr 2nd, 2020 at 10:16am
Print Post  
Hello,
I have three questions.

1. I cannot find and event that will inform me about container size change. For example, when I have two nodes within the container and I move one node closer to the second one, the container shrinks. I need to react to this change. Does exist an event for this situation?

2. Is it possible to add container property AutoGrow to WPF? I would like to resize some containers manually. I found out that this property is available only in WinForms.

3. Somewhere I read that it is not possible to change ContainerNode background. Is it even in your roadmap? Or is there any workaround for it?

Thanks for the answers
Jan
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3146
Joined: Oct 19th, 2005
Re: Container properties and event
Reply #1 - Apr 3rd, 2020 at 7:25am
Print Post  
Hi,

1. There's no dedicated event for this. Some ways you could detect it:
- check container's Bounds from NodeModified event raised for child. you might need to do that recursively if allowing nested containers.
- create a binding expression for container's Bounds property (https://docs.microsoft.com/en-us/dotnet/framework/wpf/data/how-to-create-a-bindi...)
- if using custom container class by chance, override OnSizeChanged
- if using undo/redo, handle ActionRecorded and examine ModifyCommand instances

2. We'll have it in mind for next release.

3. You should be able to change container's background via Brush property. Try setting it to ImageBrush or DrawingBrush if you need more complex backgrounds.

Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
Jan Lyson
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 26
Joined: Dec 4th, 2019
Re: Container properties and event
Reply #2 - Apr 3rd, 2020 at 4:18pm
Print Post  
Hello,
thank you, I did what I wanted  Smiley

Jan
  
Back to top
 
IP Logged
 
donep
YaBB Newbies
*
Offline


Love MindFusion

Posts: 3
Joined: Jul 30th, 2009
Re: Container properties and event
Reply #3 - May 8th, 2020 at 12:09am
Print Post  
Yes, I want too. Please give us AutoGrow property to WPF Container Cheesy
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3146
Joined: Oct 19th, 2005
Re: Container properties and event
Reply #4 - May 8th, 2020 at 6:32am
Print Post  
Roll Eyes coming soon
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3146
Joined: Oct 19th, 2005
Re: Container properties and event
Reply #5 - May 9th, 2020 at 7:43am
Print Post  
This build adds ContainerNode.AutoGrow property -
https://mindfusion.eu/_beta/wpfdiag_autogrow.zip

Regards,
Slavcho
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint