simple rotate of a boundlabel does not work


Author
Message
Hans Henrik Friis Pedersen...
Hans Henrik Friis Pedersen
Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)
Group: Forum Members
Posts: 28, Visits: 136
Hi,I would like to make a simple rotation of a boundslabel but it does not work - any ideas what I'm doing wrong??
I have tried to use .Rotat and a orientation but noting works??



NShape shape = new NRectangleShape(10, 10, 20, 20);
shape.Style.FillStyle = new NColorFillStyle(Color.FromArgb(50, 0xcc, 0, 0));

shape.Labels.RemoveAllChildren();

NBoundsLabel boundsLabel = new NBoundsLabel("Label 1, Wrapped", shape.UniqueId, new Nevron.Diagram.NMargins(0, 0, 0, 50));
shape.Labels.AddChild(boundsLabel);
shape.Labels.DefaultLabelUniqueId = boundsLabel.UniqueId;

           
NTextStyle TextStyle2 = new NTextStyle(new NFontStyle("Verdana", 2.0f, FontStyle.Regular), Color.Red);
TextStyle2.StringFormatStyle = new NStringFormatStyle(StringFormatType.GenericTypographic, HorzAlign.Center, VertAlign.Bottom);
TextStyle2.Orientation = 90.0f;
NStyle.SetTextStyle(boundsLabel, TextStyle2);
nDrawingDocument1.ActiveLayer.AddChild(shape);
boundsLabel.Shape.Rotate(CoordinateSystem.Parent, 90f, shape.Location );
NStyle.SetTextStyle(boundsLabel, TextStyle2);





GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic
1 active, 1 guest, 0 members, 0 anonymous
No members currently viewing this topic!

Login

Explore
Messages
Mentions
Search