Change default alpha for new nodes
New here, so bear with me....
Is it possible to set the default alpha value for all new nodes added to a diagram?
Do I need to create a custom symbol?
Thanks!
-k
Is it possible to set the default alpha value for all new nodes added to a diagram?
Do I need to create a custom symbol?
Thanks!
-k
SIGN IN To post a reply.
3 Replies
KH
Kelly Harrison
August 25, 2008 10:06 PM UTC
I guess I should point out that I'm working with rectangles exclusively. I'm messing around with the DrawShapes_2008 sample.
-k
>New here, so bear with me....
Is it possible to set the default alpha value for all new nodes added to a diagram?
Do I need to create a custom symbol?
Thanks!
-k
-k
>New here, so bear with me....
Is it possible to set the default alpha value for all new nodes added to a diagram?
Do I need to create a custom symbol?
Thanks!
-k
J.
J.Nagarajan
Syncfusion Team
August 26, 2008 05:04 AM UTC
Hi ,
Thanks for your interest in Syncfusion products.
To change the default alpha factor of the nodes, you have to handle NodeCollectionChanging event of DocumentEventSink and use FillStyle.ColorAlphaFactor of the node in this event. Please refer to the below code snippet.
this.diagram1.Model.EventSink.NodeCollectionChanging += new CollectionExEventHandler(EventSink_NodeCollectionChanging);
void EventSink_NodeCollectionChanging(CollectionExEventArgs evtArgs)
{
if (evtArgs.Element is Rectangle)
{
Rectangle m_rect = evtArgs.Element as Rectangle;
m_rect.FillStyle.ColorAlphaFactor = 80;
}
}
Here is the working sample.
http://websamples.syncfusion.com/samples/Diagram.Windows/F76151/main.htm
Please let me know if this helps.
Thanks,
Nagaraj
Thanks for your interest in Syncfusion products.
To change the default alpha factor of the nodes, you have to handle NodeCollectionChanging event of DocumentEventSink and use FillStyle.ColorAlphaFactor of the node in this event. Please refer to the below code snippet.
this.diagram1.Model.EventSink.NodeCollectionChanging += new CollectionExEventHandler(EventSink_NodeCollectionChanging);
void EventSink_NodeCollectionChanging(CollectionExEventArgs evtArgs)
{
if (evtArgs.Element is Rectangle)
{
Rectangle m_rect = evtArgs.Element as Rectangle;
m_rect.FillStyle.ColorAlphaFactor = 80;
}
}
Here is the working sample.
http://websamples.syncfusion.com/samples/Diagram.Windows/F76151/main.htm
Please let me know if this helps.
Thanks,
Nagaraj
KH
Kelly Harrison
August 26, 2008 02:33 PM UTC
Perfect - thanks!
-k
>Hi ,
Thanks for your interest in Syncfusion products.
To change the default alpha factor of the nodes, you have to handle NodeCollectionChanging event of DocumentEventSink and use FillStyle.ColorAlphaFactor of the node in this event. Please refer to the below code snippet.
this.diagram1.Model.EventSink.NodeCollectionChanging += new CollectionExEventHandler(EventSink_NodeCollectionChanging);
void EventSink_NodeCollectionChanging(CollectionExEventArgs evtArgs)
{
if (evtArgs.Element is Rectangle)
{
Rectangle m_rect = evtArgs.Element as Rectangle;
m_rect.FillStyle.ColorAlphaFactor = 80;
}
}
Here is the working sample.
http://websamples.syncfusion.com/samples/Diagram.Windows/F76151/main.htm
Please let me know if this helps.
Thanks,
Nagaraj
-k
>Hi ,
Thanks for your interest in Syncfusion products.
To change the default alpha factor of the nodes, you have to handle NodeCollectionChanging event of DocumentEventSink and use FillStyle.ColorAlphaFactor of the node in this event. Please refer to the below code snippet.
this.diagram1.Model.EventSink.NodeCollectionChanging += new CollectionExEventHandler(EventSink_NodeCollectionChanging);
void EventSink_NodeCollectionChanging(CollectionExEventArgs evtArgs)
{
if (evtArgs.Element is Rectangle)
{
Rectangle m_rect = evtArgs.Element as Rectangle;
m_rect.FillStyle.ColorAlphaFactor = 80;
}
}
Here is the working sample.
http://websamples.syncfusion.com/samples/Diagram.Windows/F76151/main.htm
Please let me know if this helps.
Thanks,
Nagaraj
SIGN IN To post a reply.
- 3 Replies
- 2 Participants
-
KH Kelly Harrison
- Aug 25, 2008 09:52 PM UTC
- Aug 26, 2008 02:33 PM UTC