ColumnDefinition
This class represents a GanttView column definition. A collection of ColumnDefinitions is used for describing the tree-list part of the GanttView control.
Definition
Namespace:Telerik.Windows.Controls.GanttView
Assembly:Telerik.Windows.Controls.GanttView.dll
Syntax:
public class ColumnDefinition : ColumnDefinitionBase, INotifyPropertyChanged, IHierarchical
Inheritance: objectPlatformIndependentFreezableColumnDefinitionBaseColumnDefinition
Derived Classes:
Implements:
Inherited Members
Constructors
public ColumnDefinition()
Fields
CellEditTemplateProperty
DependencyProperty
Identifies the CellEditTemplate dependency property.
public static readonly DependencyProperty CellEditTemplateProperty
CellHighlightTemplateProperty
DependencyProperty
Identifies the CellHighlightTemplate dependency property.
public static readonly DependencyProperty CellHighlightTemplateProperty
CellSelectionTemplateProperty
DependencyProperty
Identifies the CellSelectionTemplate dependency property.
public static readonly DependencyProperty CellSelectionTemplateProperty
CellTemplateProperty
DependencyProperty
Identifies the CellTemplate dependency property.
public static readonly DependencyProperty CellTemplateProperty
IsResizableProperty
DependencyProperty
Identifies the IsResizable dependency property.
public static readonly DependencyProperty IsResizableProperty
MaxWidthProperty
DependencyProperty
Identifies the MaxWidth dependency property.
public static readonly DependencyProperty MaxWidthProperty
MinWidthProperty
DependencyProperty
Identifies the MinWidth dependency property.
public static readonly DependencyProperty MinWidthProperty
Properties
CellEditTemplate
DataTemplate
Gets or sets the template of the cells in this column when in Edit mode. If this template is not set, editing is not allowed in the corresponding column. This is a dependency property.
public DataTemplate CellEditTemplate { get; set; }
The DataContext of this template is the event in the given row.
CellHighlightTemplate
DataTemplate
Gets or sets the template of the cells in this column when the mouse is over the cell. If this property is not set, the value of the CellTemplate is used. This is a dependency property.
public DataTemplate CellHighlightTemplate { get; set; }
Please notice that the DataContext of this template is not actually the event in the given row, but a Proxy object containing the following properties: Start, End, Title, FormattedValue, OriginalEvent. The OriginalEvent is the event in the row and the FormattedValue is the value extracted through the MemberBinding.
CellSelectionTemplate
DataTemplate
Gets or sets the template of the cells in this column when the mouse is over the cell. If this property is not set, the value of the CellTemplate is used.
public DataTemplate CellSelectionTemplate { get; set; }
Please notice that the DataContext of this template is not actually the event in the given row, but a Proxy object containing the following properties: Start, End, Title, FormattedValue, OriginalEvent. The OriginalEvent is the event in the row and the FormattedValue is the value extracted through the MemberBinding.
CellTemplate
DataTemplate
Gets or sets the template of the cells in this column when in normal state. If the CellHighlightTemplate or CellSelectionTemplate are not set, the selected or highlighted cells also use this template. This is a dependency property.
public DataTemplate CellTemplate { get; set; }
When this template is set the GanttView's rendering is slower than using directly the MemberBinding property, so consider carefully if you need to use this property or not. Please notice that the DataContext of this template is not actually the event in the given row, but a Proxy object containing the following properties: Start, End, Title, FormattedValue, OriginalEvent. The OriginalEvent is the event in the row and the FormattedValue is the value extracted through the MemberBinding. Use FormattedValue for best performance.
Gets or sets a value indicating whether the column can be resized through the column resizer or not.
public bool IsResizable { get; set; }
Gets or sets the maximum width of the column. The value of this property doesn't restrict the ColumnWidth property.
public double MaxWidth { get; set; }
MemberBinding
Binding
Gets or sets the binding to be used to evaluate the Cell content.
public Binding MemberBinding { get; set; }
Methods
When implemented in a derived class, creates a new instance of the Telerik.Windows.Core.PlatformIndependentFreezable derived class.
protected override PlatformIndependentFreezable CreateInstanceOverride()
The new instance.
Overrides:
When overridden in the derived class this method determines which is the actual data item for the row for a given item from the list (in most cases an HierarchicalItem).
protected virtual object GetDataContextForItemOverride(object itemData)
The original item from the source collection. In most cases this is an HierarchicalItem.
Returns:The item to be used as a data item for the cell, generated for this column for the given data item. The default implementation just extracts the SourceItem from the HierarchicalItem.