changing the bckplanestyle of a selected shape


Author
Message
Richard Dubé
Richard Dubé
Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)
Group: Forum Members
Posts: 7, Visits: 85
Hi, 
i cant figure out how i can do it with a button. I can change almost everything but the backplanestyle seems to change on all shapes.

here's the code i got

foreach (NShape shape in nDrawingView1.Selection.Nodes)
    {  
      if (shape.Style == null && shape.Style.StrokeStyle == null)
      {       
      }
      else
      {
       shape.Text = "A";
       shape.Style.EndArrowheadStyle = new NArrowheadStyle(ArrowheadShape.Arrow, "", new NSizeL(5, 5), new NColorFillStyle(Color.Gray), new NStrokeStyle(1, Color.Black));
       shape.Style.StartArrowheadStyle = new NArrowheadStyle(ArrowheadShape.Arrow, "", new NSizeL(5, 5), new NColorFillStyle(Color.Gray), new NStrokeStyle(1, Color.Black));
       shape.Style.FillStyle = new NColorFillStyle(Color.Transparent);
       NTextStyle textStyle = new NTextStyle();
 
       if (shape.Style != null && shape.Style.TextStyle != null)
       {
        textStyle = shape.Style.TextStyle;
       }
       else
       {
        textStyle = shape.ComposeTextStyle();
        NStyle.SetTextStyle(shape, textStyle);
       }
       textStyle.FontStyle = new NFontStyle("Verdana", 10, FontStyle.Regular | FontStyle.Regular);
       textStyle.FillStyle = new NColorFillStyle(Color.Black);
       textStyle.BackplaneStyle.Visible = true;
       textStyle.BackplaneStyle.StandardFrameStyle.Visible = false;
      }
    }

i tried with this  but it's not working
shape.Style.TextStyle.BackplaneStyle.Visible = true;
shape.Style.TextStyle.BackplaneStyle.StandardFrameStyle.Visible = false;

Can someone give me a hint on this please ?
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search