TableViewColumn Class
Definition
Defines a column in a Avalonia.Controls.TableViewColumn.TableView.
public class TableViewColumn
Constructors
| Name | Description |
|---|---|
| TableViewColumn | No summary available. |
TableViewColumn Constructor
public TableViewColumn()
Methods
| Name | Description |
|---|---|
| ApplyStyling | Applies styling to the control if the control is initialized and styling is not already applied. Inherited from StyledElement. |
| BeginInit | Inherited from StyledElement. |
| Bind (8 overloads) | Binds a Avalonia.AvaloniaProperty to an Avalonia.Data.BindingBase. Inherited from AvaloniaObject. |
| CheckAccess | Returns a value indicating whether the current thread is the UI thread. Inherited from AvaloniaObject. |
| ClearValue (4 overloads) | Clears a Avalonia.AvaloniaProperty's local value. Inherited from AvaloniaObject. |
| CoerceValue | Coerces the specified Avalonia.AvaloniaProperty. Inherited from AvaloniaObject. |
| EndInit | Inherited from StyledElement. |
| Equals | Compares two objects using reference equality. Inherited from AvaloniaObject. |
| GetBaseValue | Inherited from AvaloniaObject. |
| GetHashCode | Gets the hash code for the object. Inherited from AvaloniaObject. |
| GetValue (3 overloads) | Gets a Avalonia.AvaloniaProperty value. Inherited from AvaloniaObject. |
| IsAnimating | Checks whether a Avalonia.AvaloniaProperty is animating. Inherited from AvaloniaObject. |
| IsSet | Checks whether a Avalonia.AvaloniaProperty is set on this object. Inherited from AvaloniaObject. |
| SetCurrentValue (2 overloads) | Sets the value of a dependency property without changing its value source. Inherited from AvaloniaObject. |
| SetValue (3 overloads) | Sets a Avalonia.AvaloniaProperty value. Inherited from AvaloniaObject. |
| TryGetResource | Inherited from StyledElement. |
| VerifyAccess | Checks that the current thread is the UI thread and throws if not. Inherited from AvaloniaObject. |
Properties
| Name | Description |
|---|---|
| ActualThemeVariant | Gets the UI theme that is currently used by the element, which might be different than the RequestedThemeVariantProperty. Inherited from StyledElement. |
| ActualWidth | Gets the actual width of the column, in device independent pixels. If the column hasn't yet been measured, returns double.NaN. |
| Binding | Gets or sets a binding that retrieves the cell value from the row data item. Use this for simple property display, e.g. Binding="{Binding Name}". |
| CanUserEffectivelyResize | Gets whether the column can be effectively resized. The value of this property depends on both Avalonia.Controls.TableViewColumn.CanUserResize and Avalonia.Controls.TableView.CanUserResizeColumns. |
| CanUserResize | Gets or sets whether the column can be resized. Set to null to use the value from Avalonia.Controls.TableView.CanUserResizeColumns. The default is null. |
| CellTemplate | Gets or sets the data template used to display cell content. When set, the whole row data item is passed as the template's data context. |
| CellTheme | Gets or sets the theme to apply to the cells. It must target Avalonia.Controls.TableViewCell. |
| Classes | Gets or sets the styled element's classes. Inherited from StyledElement. |
| DataContext | Gets or sets the control's data context. Inherited from StyledElement. |
| Dispatcher | Returns the Avalonia.AvaloniaObject.Dispatcher that this Avalonia.AvaloniaObject is associated with. Inherited from AvaloniaObject. |
| Header | Gets or sets the column header content. |
| HeaderTemplate | Gets or sets the data template used to display the header. |
| HeaderTheme | Gets or sets the theme to apply to the header. It must target Avalonia.Controls.TableViewColumnHeader. |
| HorizontalContentAlignment | Gets or sets the horizontal alignment of the content within a cell. |
| IsInitialized | Gets a value that indicates whether the element has finished initialization. Inherited from StyledElement. |
| IsVisible | Gets or sets whether the column is visible. The default is true. |
| Item | Inherited from AvaloniaObject. |
| MaxWidth | Gets or sets the maximum column width, in device independent pixels. The default is double.PositiveInfinity. |
| MinWidth | Gets or sets the minimum column width, in device independent pixels. The default is 0. |
| Name | Gets or sets the name of the styled element. Inherited from StyledElement. |
| Parent | Gets the styled element's logical parent. Inherited from StyledElement. |
| Resources | Gets or sets the styled element's resource dictionary. Inherited from StyledElement. |
| StyleKey | Gets the type by which the element is styled. Inherited from StyledElement. |
| Styles | Gets the styles for the styled element. Inherited from StyledElement. |
| TableView | Gets the Avalonia.Controls.TableViewColumn.TableView associated with this column. |
| TemplatedParent | Gets the styled element whose lookless template this styled element is part of. Inherited from StyledElement. |
| Theme | Gets or sets the theme to be applied to the element. Inherited from StyledElement. |
| Transitions | Gets or sets the property transitions for the control. Inherited from Animatable. |
| Width | Gets or sets the column width. Supports pixel, star (*) and auto sizing. |
ActualWidth Property
Gets the actual width of the column, in device independent pixels. If the column hasn't yet been measured, returns double.NaN.
public double ActualWidth { get; set; }
Binding Property
Gets or sets a binding that retrieves the cell value from the row data item.
Use this for simple property display, e.g. Binding="{Binding Name}".
public Avalonia.Data.BindingBase Binding { get; set; }
CanUserEffectivelyResize Property
Gets whether the column can be effectively resized. The value of this property depends on both Avalonia.Controls.TableViewColumn.CanUserResize and Avalonia.Controls.TableView.CanUserResizeColumns.
public bool CanUserEffectivelyResize { get; set; }
CanUserResize Property
Gets or sets whether the column can be resized. Set to null to use the value from Avalonia.Controls.TableView.CanUserResizeColumns. The default is null.
public Nullable<bool> CanUserResize { get; set; }
CellTemplate Property
Gets or sets the data template used to display cell content. When set, the whole row data item is passed as the template's data context.
public Avalonia.Controls.Templates.IDataTemplate CellTemplate { get; set; }
Remarks
This property takes priority over Avalonia.Controls.TableViewColumn.Binding.
CellTheme Property
Gets or sets the theme to apply to the cells. It must target Avalonia.Controls.TableViewCell.
public Avalonia.Styling.ControlTheme CellTheme { get; set; }
Header Property
Gets or sets the column header content.
public object Header { get; set; }
HeaderTemplate Property
Gets or sets the data template used to display the header.
public Avalonia.Controls.Templates.IDataTemplate HeaderTemplate { get; set; }
HeaderTheme Property
Gets or sets the theme to apply to the header. It must target Avalonia.Controls.TableViewColumnHeader.
public Avalonia.Styling.ControlTheme HeaderTheme { get; set; }
HorizontalContentAlignment Property
Gets or sets the horizontal alignment of the content within a cell.
public Avalonia.Layout.HorizontalAlignment HorizontalContentAlignment { get; set; }
IsVisible Property
Gets or sets whether the column is visible. The default is true.
public bool IsVisible { get; set; }
MaxWidth Property
Gets or sets the maximum column width, in device independent pixels. The default is double.PositiveInfinity.
public double MaxWidth { get; set; }
Remarks
Applies to pixel, star and auto sizing, and interactive resizing. Must be non-negative. Column limits take precedence over the resize handle's minimum width. Star columns redistribute space when a column reaches a limit; they can leave unused space if all maxima are reached, or overflow if their minima exceed the available space. Layout rounding can adjust the resulting width to device pixel boundaries.
MinWidth Property
Gets or sets the minimum column width, in device independent pixels. The default is 0.
public double MinWidth { get; set; }
Remarks
Applies to pixel, star and auto sizing, and interactive resizing. Must be finite and non-negative. Takes precedence over Avalonia.Controls.TableViewColumn.MaxWidth if the limits conflict. Layout rounding can adjust the resulting width to device pixel boundaries.
TableView Property
Gets the Avalonia.Controls.TableViewColumn.TableView associated with this column.
public Avalonia.Controls.TableView TableView { get; set; }
Width Property
Gets or sets the column width. Supports pixel, star (*) and auto sizing.
public Avalonia.Controls.GridLength Width { get; set; }
Fields
ActualWidthProperty Field
Defines the Avalonia.Controls.TableViewColumn.ActualWidth property.
public Avalonia.DirectProperty<Avalonia.Controls.TableViewColumn, double> ActualWidthProperty
BindingProperty Field
Defines the Avalonia.Controls.TableViewColumn.Binding property.
public Avalonia.StyledProperty<Avalonia.Data.BindingBase> BindingProperty
CanUserEffectivelyResizeProperty Field
Defines the Avalonia.Controls.TableViewColumn.CanUserEffectivelyResize property.
public Avalonia.DirectProperty<Avalonia.Controls.TableViewColumn, bool> CanUserEffectivelyResizeProperty
CanUserResizeProperty Field
Defines the Avalonia.Controls.TableViewColumn.CanUserResize property.
public Avalonia.StyledProperty<Nullable<bool>> CanUserResizeProperty
CellTemplateProperty Field
Defines the Avalonia.Controls.TableViewColumn.CellTemplate property.
public Avalonia.StyledProperty<Avalonia.Controls.Templates.IDataTemplate> CellTemplateProperty
CellThemeProperty Field
Defines the Avalonia.Controls.TableViewColumn.CellTheme property.
public Avalonia.StyledProperty<Avalonia.Styling.ControlTheme> CellThemeProperty
HeaderProperty Field
Defines the Avalonia.Controls.TableViewColumn.Header property.
public Avalonia.StyledProperty<object> HeaderProperty
HeaderTemplateProperty Field
Defines the Avalonia.Controls.TableViewColumn.HeaderTemplate property.
public Avalonia.StyledProperty<Avalonia.Controls.Templates.IDataTemplate> HeaderTemplateProperty
HeaderThemeProperty Field
Defines the Avalonia.Controls.TableViewColumn.HeaderTheme property.
public Avalonia.StyledProperty<Avalonia.Styling.ControlTheme> HeaderThemeProperty
HorizontalContentAlignmentProperty Field
Defines the Avalonia.Controls.TableViewColumn.HorizontalContentAlignment property.
public Avalonia.StyledProperty<Avalonia.Layout.HorizontalAlignment> HorizontalContentAlignmentProperty
IsVisibleProperty Field
Defines the Avalonia.Controls.TableViewColumn.IsVisible property.
public Avalonia.StyledProperty<bool> IsVisibleProperty
MaxWidthProperty Field
Defines the Avalonia.Controls.TableViewColumn.MaxWidth property.
public Avalonia.StyledProperty<double> MaxWidthProperty
MinWidthProperty Field
Defines the Avalonia.Controls.TableViewColumn.MinWidth property.
public Avalonia.StyledProperty<double> MinWidthProperty
TableViewProperty Field
Defines the Avalonia.Controls.TableViewColumn.TableView property.
public Avalonia.DirectProperty<Avalonia.Controls.TableViewColumn, Avalonia.Controls.TableView> TableViewProperty
WidthProperty Field
Defines the Avalonia.Controls.TableViewColumn.Width property.
public Avalonia.StyledProperty<Avalonia.Controls.GridLength> WidthProperty
Events
| Name | Description |
|---|---|
| ActualThemeVariantChanged | Raised when the theme variant is changed on the element or an ancestor of the element. Inherited from StyledElement. |
| AttachedToLogicalTree | Raised when the styled element is attached to a rooted logical tree. Inherited from StyledElement. |
| DataContextChanged | Occurs when the Avalonia.StyledElement.DataContext property changes. Inherited from StyledElement. |
| DetachedFromLogicalTree | Raised when the styled element is detached from a rooted logical tree. Inherited from StyledElement. |
| Initialized | Occurs when the styled element has finished initialization. Inherited from StyledElement. |
| PropertyChanged | Raised when a Avalonia.AvaloniaProperty value changes on this object. Inherited from AvaloniaObject. |
| ResourcesChanged | Occurs when a resource in this styled element or a parent styled element has changed. Inherited from StyledElement. |