Skip to end of metadata
Go to start of metadata

Working with CanUserSort Property

UXPageableComboBox columns also comes with sorting capability. This feature can be enabled by set the CanUserSort property to True. If you prefer to disable sorting on certain columns, set the CanUserSort property of the column to False.

Working with Header Property

By default, column header will be displayed in multiple column mode. But if you want to hide the column header, simply set the ColumnHeaderVisibility property to Collapsed.

The following code will explain how to implement it on UXPageableComboBox control.

XAML

Definition

public abstract class UXDataComboBoxColumn : DependencyObject

Summary

The following table summarizes the members exposed in this class.

Public Constructors

UXDataComboBoxColumn Constructor()Initializes a new instance of the UXDataComboBoxColumn class.

Public Properties

CanUserSortGets or sets a value indicating whether the column can be sorted or not.
CellStyleGets or sets the cell style.
CellTemplateGets or sets the cell template.
HeaderGets or sets the column header text.
HeaderBindingGets or sets column header binding.
HeaderStyleGets or sets the style that is used when rendering the column header.
HeaderTemplateGets or sets the template that is used when rendering the column header.
HeaderWidthGets or sets the width of the column header. If not specified, the column will use the value specified in UXDataComboBoxColumn property.
HorizontalCellAlignmentGets or sets the horizontal cell alignment.
HorizontalHeaderAlignmentGets or sets the horizontal header alignment.
MaxWidthGets or sets the column maximum width.
MinWidthGets or sets the column minimum width.
SortMemberPathGets or sets the column sort path.
VerticalCellAlignmentGets or sets the vertical cell alignment.
VerticalHeaderAlignmentGets or sets the vertical header alignment.
VisibilityGets or sets the column visibility.
WidthGets or sets the column width.

Protected Properties

ProductProduct Info.

Fields

CanUserSortPropertyIdentifies the CanUserSort dependency property.
CellStylePropertyIdentifies the CellStyle dependency property.
CellTemplatePropertyIdentifies the CellTemplate dependency property.
HeaderPropertyIdentifies the Header dependency property.
HeaderWidthPropertyIdentifies the HeaderWidth dependency property.
HorizontalCellAlignmentPropertyIdentifies the HorizontalCellAlignment dependency property.
HorizontalHeaderAlignmentPropertyIdentifies the HorizontalHeaderAlignment dependency property.
MaxWidthPropertyIdentifies the MaxWidth dependency property.
MinWidthPropertyIdentifies the MinWidth dependency property.
SortMemberPathPropertyIdentifies the SortMemberPath dependency property.
VerticalCellAlignmentPropertyIdentifies the VerticalCellAlignment dependency property.
VerticalHeaderAlignmentPropertyIdentifies the VerticalHeaderAlignment dependency property.
VisibilityPropertyIdentifies the Visibility dependency property.
WidthPropertyIdentifies the Width dependency property.

Public Methods

ResetSortState()Reset column sort state.

Public Constructors

public UXDataComboBoxColumn()

Initializes a new instance of the UXDataComboBoxColumn class.

Public Properties

public bool CanUserSort { get; set; }

Gets or sets a value indicating whether the column can be sorted or not.

public Style CellStyle { get; set; }

Gets or sets the cell style.

public DataTemplate CellTemplate { get; set; }

Gets or sets the cell template.

public object Header { get; set; }

Gets or sets the column header text.

public Binding HeaderBinding { get; set; }

Gets or sets column header binding.

Remarks

UXPageableComboBox column also support column header binding. This feature can be used to localize the column header text, suppose you want to make your application available in multi language. To use this feature, simply bind your localized resources to each column's UXDataComboBoxColumn property. To learn more about Localization, see Localization Overview.

 

public Style HeaderStyle { get; set; }

Gets or sets the style that is used when rendering the column header.

public DataTemplate HeaderTemplate { get; set; }

Gets or sets the template that is used when rendering the column header.

public GridLength HeaderWidth { get; set; }

Gets or sets the width of the column header. If not specified, the column will use the value specified in UXDataComboBoxColumn property.

public HorizontalAlignment HorizontalCellAlignment { get; set; }

Gets or sets the horizontal cell alignment.

public HorizontalAlignment HorizontalHeaderAlignment { get; set; }

Gets or sets the horizontal header alignment.

public double MaxWidth { get; set; }

Gets or sets the column maximum width.

public double MinWidth { get; set; }

Gets or sets the column minimum width.

public string SortMemberPath { get; set; }

Gets or sets the column sort path.

Remarks

When sorting is enabled, you can specify the SortMemberPath property of UXPageableComboBox column to a value that represents the member path for sorting. If not specified, the SortMemberPath property will be automatically set to the member path defined in the UXDataComboBoxBoundColumn property.

 

public VerticalAlignment VerticalCellAlignment { get; set; }

Gets or sets the vertical cell alignment.

public VerticalAlignment VerticalHeaderAlignment { get; set; }

Gets or sets the vertical header alignment.

public Visibility Visibility { get; set; }

Gets or sets the column visibility.

public GridLength Width { get; set; }

Gets or sets the column width.

Protected Properties

protected ProductInfo Product { get; }

Product Info.

Fields

public static readonly DependencyProperty CanUserSortProperty

Identifies the CanUserSort dependency property.

public static readonly DependencyProperty CellStyleProperty

Identifies the CellStyle dependency property.

public static readonly DependencyProperty CellTemplateProperty

Identifies the CellTemplate dependency property.

public static readonly DependencyProperty HeaderProperty

Identifies the Header dependency property.

public static readonly DependencyProperty HeaderWidthProperty

Identifies the HeaderWidth dependency property.

public static readonly DependencyProperty HorizontalCellAlignmentProperty

Identifies the HorizontalCellAlignment dependency property.

public static readonly DependencyProperty HorizontalHeaderAlignmentProperty

Identifies the HorizontalHeaderAlignment dependency property.

public static readonly DependencyProperty MaxWidthProperty

Identifies the MaxWidth dependency property.

public static readonly DependencyProperty MinWidthProperty

Identifies the MinWidth dependency property.

public static readonly DependencyProperty SortMemberPathProperty

Identifies the SortMemberPath dependency property.

public static readonly DependencyProperty VerticalCellAlignmentProperty

Identifies the VerticalCellAlignment dependency property.

public static readonly DependencyProperty VerticalHeaderAlignmentProperty

Identifies the VerticalHeaderAlignment dependency property.

public static readonly DependencyProperty VisibilityProperty

Identifies the Visibility dependency property.

public static readonly DependencyProperty WidthProperty

Identifies the Width dependency property.

Public Methods

public void ResetSortState()

Reset column sort state.

  • No labels