CustomViewDefinition
Represents a custom ViewDefinitionBase that overrides the GroupDescriptions and allows custom visible range formatting.
Definition
Namespace:Telerik.Windows.Controls
Assembly:Telerik.Windows.Controls.ScheduleView.dll
Syntax:
public class CustomViewDefinition : MultidayViewDefinition, INotifyPropertyChanged, ISlotConvertor
Inheritance: objectViewDefinitionBaseMultidayViewDefinitionCustomViewDefinition
Implements:
Inherited Members
Constructors
Initializes a new instance of the CustomViewDefinition class.
public CustomViewDefinition()
Fields
CurrentVisibleRangeFormatProperty
DependencyProperty
Identifies the CurrentVisibleRangeFormat property.
public static readonly DependencyProperty CurrentVisibleRangeFormatProperty
The identifier for the CurrentVisibleRangeFormat property.
Properties
Gets or sets the format to be used for displaying the current visible range.
public string CurrentVisibleRangeFormat { get; set; }
The format will be passed to String.Format to format the current visible range data, that is represented by the VisibleRangeStart, VisibleRangeEnd and CurrentDate properties of the ScheduleView in this order.
Gets the date group description. This property return null so that GroupDescriptors are used to specify the grouping.
protected override DateGroupDescription DateGroupDescription { get; }
Overrides:
GroupDescriptions
ObservableCollection<GroupDescription>
Gets or sets a collection of GroupDescription objects that describes how the items in the collection are grouped in the view.
public ObservableCollection<GroupDescription> GroupDescriptions { get; }
Methods
CreateInstanceCore()
Freezable
Creates a new instance of the CustomViewDefinition class.
protected override Freezable CreateInstanceCore()
Freezable
The new instance.
When overridden in a derived class, this method formats the string that represents the current visible range.
protected override string FormatVisibleRangeText(IFormatProvider formatInfo, DateTime rangeStart, DateTime rangeEnd, DateTime currentDate)
The format info provider to be used for formatting.
rangeStartDateTimeThe start of the visible range.
rangeEndDateTimeThe end of the visible range.
currentDateDateTimeThe current date.
Returns:The formatted string to be displayed as current visible range.
Overrides:
GetGroupDescriptions()
IEnumerable<GroupDescription>
Gets the group descriptions.
protected override IEnumerable<GroupDescription> GetGroupDescriptions()
IEnumerable<GroupDescription>
An enumerable set of GroupDescription objects that will be used for grouping.
Overrides: