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


Rock and Roll

Posts: 685
Joined: Apr 6th, 2003
Diagramming for WPF, V3.0
Nov 20th, 2012 at 11:25am
Print Post  
We have released version 3.0 of WpfDiagram. It contains the following new features and improvements:

Node effects
Two visual effects, represented by GlassEffect and AeroEffect classes, can be applied to nodes. To apply an effect, create an instance of the respective class, set up its properties, then add the instance to the Effects collection of a node (or to Diagram.NodeEffects collection to apply it to all nodes). Effects can be added, removed or modified at any time and this will immediately reflect on the diagram. Effects of different types can be applied simultaneously. It is also possible to apply more than one effect of the same type.

Improved styling support
The Brush, Stroke* and Font* dependency properties no longer contain initial local values and will inherit style values without having to clear the local values first. The diagram now exposes a style property for each built-in node type, which allows creating global styles for nodes directly in the diagram's markup code in the Xaml page. The properties are called ShapeNodeStyle, TableNodeStyle, etc. and are of the WPF's standard Style type.

Themes and Theme Editor
A theme in WpfDiagram is a set of styles, each associated with specific item type. When the theme is applied to a diagram, the styles registered in the theme affect all objects of their associated type. Themes are represented by the Theme class and can be assigned to Diagram objects through the Theme property. Styles are associated with types within the theme through the RegisterStyle method. The package now includes a Theme Editor tool that provides simple visual environment for theme creation and modification. There are also several predefined themes available in the Themes subfolder of the installation root folder.

Diagram documents and tabbed views
The DiagramDocument class represents a collection of diagram pages or sheets, represented by DiagramPage objects. DiagramPage is derived from Diagram and only adds a Title property, so any current code that processes Diagram objects will work with DiagramPages too. New pages can be added to the document and existing pages can be removed and reordered via the Pages collection. The diagram document provides higher level of events for the pages contained inside it. The document supports the notion of an active page. Documents can also be exported to PDF and Visio using the new overloads available in the PdfExporter and VisioExporter classes respectively.

The new TabbedDiagramView can be used to display DiagramDocument objects. The view displays tabs for the individual pages in the document. The active page can be changed interactively by activating its associated tab. New pages can be added and removed to/from the document through buttons in the tab tray and the pages can be rearranged by dragging their associated tabs with the mouse.

Multiple labels per link
The LinkLabel class allows multiple captions to be displayed for a single DiagramLink object. LinkLabels provide a set of properties allowing full customization of their display and positioning. Labels can also be arranged automatically to avoid overlapping nodes and other labels by setting LinkLabel.AutoArrange to true.

Layers
Items can now be assigned to layers, and layers can be hidden, locked or moved up/down in the Z order as a group. Set the LayerIndex property of items to associate them with layers in the Diagram.Layers collection. The Layer objects provide Visible, Locked and ZIndex properties, which will affect all items in the respective layer. Layers also expose a Title property shown in the LayerListView control. Newly drawn items are added to the layer specified via Diagram.ActiveLayer.

Layer list control
The LayerListView control provides user interface for working with Layer objects. The control displays a list of the specified Diagram's layers with a title and an overview area, and also allows editing of layer's Visible and Locked properties and choosing the Diagram's currently active layer. New layers can be added to the Diagram by clicking the + button.

One-way layout
The OneWayLayout class ensures that links enter into nodes from the same general direction and exit them from the opposite side. If the graph contains cycles, some links bend around the nodes to keep the enter/exit direction consistent. The algorithm aims to minimize the number of such links.


Parallel layouts
The .NET 4 version of WpfDiagram takes advantage of the Task Parallel Library (TPL) to enable parallelism on the different layout algorithms. Set the EnableParallelism property on the Layout class to true to enable arranging different subgraphs on different threads to possibly improve performance on multiprocessor systems. In addition, the maximum degree of concurrency can be manipulated through the MaxDegreeOfParallelism property. Note that only independent subgraphs are processed in parallel, so the SplitGraph property of layout classes that provide it must also be set.

Magnifier
The new magnifier tool allows users to interactively zoom in (or out) portions of the diagram by holding down a modifier key or pressing a mouse button. The magnifier's zoom factor and appearance can be customized.

Miscellaneous
~ the value of DiagramItem.ZIndex property is no longer required to be unique and smaller than the number of items;
~ Shape property in ContainerNode and TreeViewNode can be set to Rectangle or RoundRect
~ diagram item collection types now implement the generic IList<> interface

API changes
~ Brush, Stroke* and Font* dependency properties no longer have local values set by default.
~ ZLevelUp, ZLevelDown, ZTop and ZBottom methods now require a boolean argument specifying whether items are allowed to change layers;
~ ZIndex no longer corresponds to the position of items within Diagram.Items collection. Items however still contains the items sorted by Z order, as defined by item's ZIndex and LayerIndex;
~ event handler delegates have been removed; events are now defined as generic EventHandler<> specialized via EventArgs type. For example the type of NodeCreated is now
public event EventHandler<NodeEventArgs> NodeCreated;

Registered customers with an active upgrade subscription can download the licensed version from the clients area on our site.
    
A trial version is available for download here: 
https://mindfusion.eu/WpfDiagTrial.zip

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