Flexible TreeView Flexible TreeView


Support & Community

Summary. Appearance

Previous Table of Contents Next

Flexible TreeView allows you to completely redesign the summary appearance as you need by using these summary properties:

  • WrapToNextLevel – defines whether to move the summary to the next summary level;
  • IncludeChildrenNodes – defines whether to calculate summary value only for the specified node`s children nodes or for the node`s children nodes including their children nodes (value by default);
  • Stretch – defines whether to stretch the summary to fill all available space. If enabled, all further summaries will be auto-wrapped to the next level;
  • Visible – controls the summary visibility;
  • Width – defines the summary`s width in pixels;
  • DisplayFormat – allows you to customize the summary value`s format;
  • Alignment – defines the summary`s alignment within the available space. If there are many summaries to display with different alignments, the first summary`s alignment will be taken into account for all additional summaries on the same level;
  • TextAlignment - defines the summary text`s alignment within summary bounds;
  • BorderColor – allows you to override the summary`s border color. Default border color is defined in the treeview`s theme;
  • BackgroundColor - allows you to override the summary`s background color. Default summary background color is defined in the treeview`s theme.

Also, you can change all summaries` appearance using data provider`s settings.


WrapToNextLevel

Flexible TreeView supports displaying summaries on many levels:

You can create multilevel summaries within a minute

To move summary to the next level, enable the WrapToNextLevel summary property. On every separate level, you can align summaries differently as shown in the picture above.


IncludeChildrenNodes

By default, summary calculates the value of the specified node`s children nodes and all their children nodes, but you can tell the summary to use only node`s children nodes. To do that, disable the IncludeChildrenNodes summary property.


DisplayFormat

By default, summary shows the aggregated value in this format:
     [Summary operation name][Operation delimiter][Summary value]
For example:
     Count=45

To change the summary value output format, use the DisplayFormat summary property. To do that, enable the Enabled property and fill the FortmatText property by custom format pattern.
When the summary formats the output value, it uses three placeholders:

  • {0} – to insert the summary operation short name;
  • {1} – to insert the operation delimiter;
  • {2} – to insert the summary value.

You can use these placeholders in your custom format as well.
For example, to change (to ‘:’ in this case) the operation`s delimiter string, use this string for the FormatText property:
    {0}:{2}


BorderColor, BackgroundColor

By default, the summary`s border and background colors are controlled by the treeview`s current theme, but you can override them by using BorderColor and BackgroundColor summary properties.
To tell the summary to use theme`s settings again, assign the Color.Empty value to the BorderColor property and NULL to the BackgroundColor property.


Text color

To change the summary text color, use custom display format with the ‘font’ html tag as shown below:

Example:

{sourcecode}NodesSummaryItem summary = new NodesSummaryItem();
summary.DisplayFormat.Enabled = true;
summary.DisplayFormat.FormatText = "{0}{1}<font color='Red'><b>{2}</b></font>";{sourcecode}

Here we change the summary value`s text color to red and make it bold.


Image

You can display an image in the summary by using the Image summary property. To align the image, use the ImageAlign summary property.


Run-time appearance customization

You can customize every summary`s appearance in run-time by using the PaintSummary and PaintSummaryBackground treeview events to draw summary`s value and background respectively.

Previous Top Next


Last news
Bookmark and Share
Use Flexible TreeView in WPF project
Sunday, 18 December 2011

Do you have a WPF project and want to use Flexible TreeView there? No problem!

Flexible TreeView v3.4
Friday, 16 December 2011

Flexible TreeView v3.4 maintenance release has been released.

Flexible TreeView v3.3
Friday, 23 September 2011

Flexible TreeView v3.3 maintenance release has been released. Separate assemblies for .NET 2.0, 4.0 and 4.0 Client Profile, HTML markup extension, etc.

Latest release

Version:
Release date:
3.4
Dec 16, 2011


Copyright © 2006-2012 ARMSoft. All rights reserved.