Skip to main content
Version: 4.2

Timeline

Namespace: Wisej.Web

Assembly: Wisej.Framework (4.2.0.0)

Displays an ordered vertical activity feed with markers, time, detail, and optional hosted content.

public class Timeline : Control

Item order is preserved. MaxItems limits display without deleting data. Bound lists own collection structure.

Example:

var timeline = new Timeline { Grouping = TimelineGrouping.ByDay, TimeFormat = "HH:mm" };
timeline.Items.Add(new TimelineItem(DateTime.Now, "Deployment finished")
{
Description = "All nodes are healthy.",
Tone = TimelineTone.Success,
Content = new Button { Text = "View details", Height = 32 }
});
timeline.ItemClick += (sender, e) => MessageBox.Show(e.Item.Title);
this.Controls.Add(timeline);

Constructors​

Instance member Timeline()​

Initializes an empty timeline with a 100-row display limit.

Properties​

Instance member ContentMember​

String: Gets or sets the hosted control property name. Empty looks for Content. (Default: "")

Instance member DataMember​

String: Gets or sets the list path within DataSource. Empty uses the source itself. (Default: "")

Instance member DataSource​

Object: Gets or sets an IList, IListSource, BindingSource, or an object resolved through DataMember. (Default: null)

IBindingList and collection/item notifications refresh automatically. Call RefreshData after structural changes to a plain list. Perform source updates in the owning Wisej session using the application's usual session update mechanism. While bound, modify source records instead of Items. Editing a generated item does not write back to the source and is overwritten by the next refresh.

Example:

var records = new System.ComponentModel.BindingList<TimelineItem>();
timeline.DataSource = records; // Conventional names Time, Title, Description, etc. are used.
records.Add(new TimelineItem(DateTime.Now, "Connected"));
records[0].Description = "Connection verified."; // Item notifications refresh the view.

Protected member DefaultSize​

Size: Gets the default timeline size of 420 by 280 pixels.

Instance member DescriptionMember​

String: Gets or sets the description property name. Empty looks for Description. (Default: "")

Instance member Focusable​

Boolean: Gets or sets outer-container focusability. The default is false. (Default: False)

Instance member Grouping​

TimelineGrouping: Gets or sets date grouping. The default is None. ByDay never reorders entries. (Default: None)

Instance member HasMoreItems​

Boolean: Gets or sets whether more data can be requested. The default is true. (Default: True)

The button is shown when this property is true. Handle LoadMore or override OnLoadMore to supply older items.

Instance member IconMember​

String: Gets or sets the icon source property name. Empty looks for Icon. (Default: "")

Instance member Items​

TimelineItemCollection: Gets the ordered activity entries. Structural changes are prohibited while DataSource is set.

Instance member LoadMoreText​

String: Gets or sets the localized load-more button caption. (Default: null)

Null uses the built-in text for the current UI culture. An empty string suppresses the text.

Instance member MaxItems​

Int32: Gets or sets the positive maximum number of displayed items. The default is 100. (Default: 100)

This is a display limit; the collection and bound source are not truncated.

Instance member ShowConnector​

Boolean: Gets or sets whether adjacent items in a group are connected. The default is true. (Default: True)

Instance member TabStop​

Boolean: Gets or sets tab participation for the outer container. The default is false; interactive children remain reachable. (Default: False)

Instance member TagMember​

String: Gets or sets the application tag property name. Empty looks for Tag. (Default: "")

Instance member TimeFormat​

String: Gets or sets a .NET timestamp format. The default is HH:mm; formatting uses the current culture. (Default: "HH:mm")

Throws:

Instance member TimeMember​

String: Gets or sets the timestamp property name. Empty looks for Time. (Default: "")

Instance member TimePosition​

TimelineTimePosition: Gets or sets timestamp placement. The default is Left, mirrored in RTL. (Default: Left)

Instance member TitleMember​

String: Gets or sets the title property name. Empty looks for Title. (Default: "")

Example:

timeline.TimeMember = "OccurredAt";
timeline.TitleMember = "Message";
timeline.DescriptionMember = "Detail";
// Set DataSource to a list whose records expose these properties.

Instance member ToneMember​

String: Gets or sets the tone property name. Empty looks for Tone. (Default: "")

Methods​

Protected member Dispose(disposing)​

Unsubscribes from source and item notifications, then disposes hosted controls through Control.

ParameterTypeDescription
disposingBooleanWhether managed resources should be released.

Protected member OnDataSourceChanged(e)​

Raises DataSourceChanged.

ParameterTypeDescription
eEventArgsEvent data.

Protected member OnItemClick(e)​

Raises ItemClick for a current displayed activity.

ParameterTypeDescription
eTimelineItemEventArgsClicked item and source information.

Protected member OnLoadMore(e)​

Raises LoadMore.

ParameterTypeDescription
eEventArgsEvent data.

Protected member OnWebEvent(e)​

Dispatches client events to their processing methods.

ParameterTypeDescription
eWisejEventArgsClient event.

Protected member OnWebRender(config)​

Serializes a versioned view; source records and tags remain on the server.

ParameterTypeDescription
configObjectClient configuration.

Instance member Prepend(item)​

Inserts an unbound item at the start. While bound, insert into the source list instead.

ParameterTypeDescription
itemTimelineItemNon-null activity not already owned by a collection.

Example:

timeline.Prepend(new TimelineItem(DateTime.Now, "New activity"));
// When bound, insert into the source instead of modifying Items:
var records = new System.ComponentModel.BindingList<TimelineItem>();
timeline.DataSource = records;
records.Insert(0, new TimelineItem(DateTime.Now, "New bound activity"));

Instance member RefreshData()​

Rebuilds items from the current source, for plain lists without change notifications.

Example:

var records = new System.Collections.Generic.List<TimelineItem>();
timeline.DataSource = records;
records.Add(new TimelineItem(DateTime.Now, "Added to a plain list"));
timeline.RefreshData(); // List<T> does not notify when its structure changes.

Events​

Instance member DataSourceChanged​

EventHandler Occurs after DataSource changes and its items are rebuilt.

Instance member ItemClick​

EventHandler<TimelineItemEventArgs> Occurs when an item header is clicked or activated with Enter or Space.

Instance member LoadMore​

EventHandler Occurs when the user requests older activities through the Load more button.

Append older data and, when exhausted, set HasMoreItems to false. Loading and source paging are application responsibilities.

Example:

timeline.LoadMore += (sender, e) =>
{
// In a real application, retrieve the next page from your data source here.
timeline.Items.Add(new TimelineItem(DateTime.Today.AddDays(-1), "Older activity"));
timeline.HasMoreItems = false; // This example has no further pages.
};

Implements​

NameDescription
IUserDataProvides access to the UserData and Tag properties associated to the component implementing this interface.
IBindableComponentBindable components implement this interface.
IDropTargetControls that support drag & drop operations implement this interface.
IWisejComponentAll wisej components implement this interface.
IWisejControlAll wisej controls derived from the Control class must implement this interface.
IWisejSerializableAllows an object to serialize itself.