Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Version 2.3.1 beta (Read 2084 times)
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Version 2.3.1 beta
Mar 19th, 2010 at 9:41am
Print Post  
In the next few months we'll be redesigning the control' API to make it better integrated into the WPF programming model. This release includes the first batch of properties moved to the dependency property system, and adds a few customer-requested features:

New font properties
The Font property of diagram nodes, table cells and treeview items is deprecated. The DiagramItem class now exposes FontFamily, FontSize, FontStretch, FontStyle, FontWeight and TextDecorations dependency properties. This enables better support for the WPF animation and styling features. The Cell and TreeViewItem classes now derive from a common TextPresenter class that provides the same font properties as DiagramItem.

New text alignment properties
The TextFormat and CaptionFormat properties are now deprecated. They have been replaced by the TextAlignment, TextVerticalAlignment, TextWrapping and TextTrimming properties defined in DiagramItem. In addition, there is a new TextPadding property that specifies the padding of text within the text's bounding rectangle. The same properties are exposed by TextPresenter - the new base class of the Cell and TreeViewItem classes.

New pen properties
The Pen property of DiagramItem is deprecated. It has been replaced by Stroke, StrokeThickness, StrokeDashStyle, StrokeDashCap, StrokeStartLineCap, StrokeEndLineCap, StrokeLineJoin and StrokeMiterLimit. This enables better support for the WPF animation and styling features.

Miscellaneous
~ The OriginConnection and DestinationConnection properties of DiagramLink enable getting detailed information about the link's origin and destination, such as the target TreeViewItem when connected to a TreeViewNode.
~ Auto-scrolling in the Overview control has been improved.
~ ClipText property added to ShapeNode.

If anyone is interested in trying the beta, please download this archive, which includes updated assemblies and help file:
https://mindfusion.eu/_beta/diagramming.wpf.231.zip

We plan to keep the old Font, TextFormat and Pen properties in the API for source-level compatibility with our controls for other platforms. However they are marked as obsolete, and .NET compilers will output warnings when they are used.

To implement better support for WPF databinding and styling, it seems we'll also need to change the DiagramItem base class from UIElement to FrameworkElement. However our tests show that the performance is worse when there are hundreds or thousands FrameworkElements in the diagram, while UIElements are much faster.

Now this poses a dilemma: we could either provide two separate sets of assemblies based on UIElement / FrameworkElement inheritance, or otherwise build a separate hierarchy upon the DiagramNodeAdapter class with hosted FrameworkElements that will allow styling and templating. We'd be happy to hear your feedback on this. In any case the UIElement-based hierarchy will remain for people that need to display larger diagrams, and in the next release we'll add something FrameworkElement -based to allow for styling and binding.

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