Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Shape - 'rectangle' with only 3 borders visible (Read 2322 times)
dku
YaBB Newbies
*
Offline



Posts: 41
Joined: Jun 5th, 2008
Shape - 'rectangle' with only 3 borders visible
Aug 26th, 2008 at 8:35am
Print Post  
Hello,

I need a rectangle with top, left, bottom border drawn (opened on the right side).

I've tried using a template with 3 lines :

Code
Select All
static private ElementTemplate[] s_TextAreaCenterTemplate = new ElementTemplate[] {
    new LineTemplate(0, 0, 100, 0),
    new LineTemplate(100, 0, 100, 100),
    new LineTemplate(100, 100, 100, 0),
    new LineTemplate(100, 0, 0, 0)};

static private ElementTemplate[] s_IncompletePlaceHolderTemplate = new ElementTemplate[] {
    new LineTemplate(100, 0, 0, 0),
    new LineTemplate(0, 0, 0, 100),
    new LineTemplate(0,100, 100, 100)};

static private MindFusion.Diagramming.Wpf.Shape s_IncompletePlaceHolderShape = new MindFusion.Diagramming.Wpf.Shape
    (s_IncompletePlaceHolderTemplate,
    null, // no decorations
    s_TextAreaCenterTemplate,
    FillRule.Nonzero,
    "TextCenter");
 


But setting the Pen from the Shape to black, will draw the 4 lines ...

Any hint ?

Thanks
Didier
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Shape - 'rectangle' with only 3 borders visibl
Reply #1 - Aug 26th, 2008 at 10:38am
Print Post  
Hi,

The outline figure is closed automatically. You could use the LineTemplate constructor that takes Color argument for the three lines that should be visible - e.g. specify Black. Do not set a color for the fourth line. Use the transparent Color for the ShapeNode.Pen and you will still see the three lines; if a color is specified in their constructor, it overrides the color of the ShapeNode.Pen.

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



Posts: 41
Joined: Jun 5th, 2008
Re: Shape - 'rectangle' with only 3 borders visibl
Reply #2 - Aug 26th, 2008 at 11:18am
Print Post  
Hello,

Thanks, it works perfectly.

Bye
Didier
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint