Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Shadows (Read 1313 times)
Novice
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 14
Joined: Apr 19th, 2011
Shadows
Aug 3rd, 2011 at 11:06am
Print Post  
Hello

I want to be able to switch shadows on/off for a diagram and immediately show all existing nodes with the shadow setting.  The following code is what I'm currently using ....

       public bool EnableShadow
       {
           set
           { 
               // set diagram properties
               diagram1.EnableShadowEffects = value;
               if (value)
                   diagram1.ShadowsStyle = ShadowsStyle.OneLevel;
               else
                   diagram1.ShadowsStyle = ShadowsStyle.None;
               // loop through nodes and reset these properties ...
               // otherwise setting diagram property appears to have no affect on nodes that already exist
               foreach (DiagramNode node in diagram1.Nodes)
                   {
                       node.ShadowColor = diagram1.ShadowColor;
                       node.ShadowOffsetX = diagram1.ShadowOffsetX;
                       node.ShadowOffsetY = diagram1.ShadowOffsetY;
                   }
           }
           get { return diagram1.EnableShadowEffects; }
       }

This works ok for nodes that are on the main diagram but for nodes that are displayed in a ContainerNode shadows are never shown.  Is there a way to switch on/off shadows for nodes displayed on a ContainerNode?
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Shadows
Reply #1 - Aug 3rd, 2011 at 12:46pm
Print Post  
If ShadowsStyle is set to OneLevel, the shadows of all nodes (including the nodes inside containers) are displayed before any nodes are drawn (including containers). In other words, the shadows of the nodes are displayed below the containers. To make the shadows display over the containers, you have to set ShadowsStyle to ZOrder.

Regards,
Meppy
  
Back to top
 
IP Logged
 
Novice
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 14
Joined: Apr 19th, 2011
Re: Shadows
Reply #2 - Aug 3rd, 2011 at 2:25pm
Print Post  
That's worked.  Thanks.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint