Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Diagramming for WPF, V3.8.2 (Read 236 times)
Forum Admin
YaBB Administrator
*****
Offline


Rock and Roll

Posts: 635
Joined: Apr 6th, 2003
Diagramming for WPF, V3.8.2
Jul 22nd, 2022 at 7:20am
Print Post  
We have released version 3.8.2 of WPF Diagram control. It contains the following new features and improvements:

Multiple labels per node
The NodeLabel class allows multiple captions to be displayed for a single DiagramNode of any type. Node labels provide a set of properties allowing full customization of their display and positioning. Label position is defined by specifying a pin point and offset from it, set through SetCornerPosition, SetEdgePosition, SetCenterPosition methods. In addition, the TextAlignment and TextVerticalAlignment properties of NodeLabel specify on which side of pin point to draw the label's caption.

For example, following code adds extra labels to top-left and bottom-right corners of a ShapeNode:

Code
Select All
var node = diagram.Factory.CreateShapeNode(30, 70, 80, 60);
node.Text = "text"; // centered main text

var lb1 = node.AddLabel("label 1");
lb1.SetCornerPosition(0, 0, 0);
lb1.TextAlignment = TextAlignment.Left;
lb1.TextVerticalAlignment = AlignmentY.Top;
lb1.Brush = Brushes.Red;
lb1.TextBrush = Brushes.White;
lb1.Margin = new Thickness(4);
lb1.TextPadding = new Thickness(0);

var lb2 = node.AddLabel("label 2");
lb2.SetCornerPosition(2, 0, 0);
lb2.TextAlignment = TextAlignment.Right;
lb2.TextVerticalAlignment = AlignmentY.Bottom;
lb2.Brush = Brushes.Yellow;
lb2.TextBrush = Brushes.Red; 


Export improvements
  • New Export overloads of exporter classes allow writing to System.IO.Stream.
  • ExcelExporter exports pen width of links.
  • ExcelExporter sets more precise positions of link end points.

Miscellaneous
  • The MoveLabels behavior lets user move link and node labels interactively.
  • HorizontalOffset and VerticalOffset now work for link labels positioned using SetLinkLengthPosition method.

Installer for the latest version can be downloaded here, or from the clients area on our site:
https://mindfusion.eu/WpfDiagTrial.zip

Updated assemblies are also available as MindFusion.Diagramming.Wpf NuGet package.

Enjoy!
  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint