DataGridColumn 類別

定義

表示 DataGrid 資料行。

public ref class DataGridColumn abstract : System::Windows::DependencyObject
public abstract class DataGridColumn : System.Windows.DependencyObject
type DataGridColumn = class
    inherit DependencyObject
Public MustInherit Class DataGridColumn
Inherits DependencyObject
繼承
衍生

備註

這個抽象類別提供所有資料 DataGrid 行的基底功能。

建構函式

DataGridColumn()

初始化 DataGridColumn 類別的新執行個體。

欄位

ActualWidthProperty

識別 ActualWidth 相依性屬性。

CanUserReorderProperty

識別 CanUserReorder 相依性屬性。

CanUserResizeProperty

識別 CanUserResize 相依性屬性。

CanUserSortProperty

識別 CanUserSort 相依性屬性。

CellStyleProperty

識別 CellStyle 相依性屬性。

DisplayIndexProperty

識別 DisplayIndex 相依性屬性。

DragIndicatorStyleProperty

識別 DragIndicatorStyle 相依性屬性。

HeaderProperty

識別 Header 相依性屬性。

HeaderStringFormatProperty

識別 HeaderStringFormat 相依性屬性。

HeaderStyleProperty

識別 HeaderStyle 相依性屬性。

HeaderTemplateProperty

識別 HeaderTemplate 相依性屬性。

HeaderTemplateSelectorProperty

識別 HeaderTemplateSelector 相依性屬性。

IsAutoGeneratedProperty

識別 IsAutoGenerated 相依性屬性。

IsFrozenProperty

識別 IsFrozen 相依性屬性。

IsReadOnlyProperty

識別 IsReadOnly 相依性屬性。

MaxWidthProperty

識別 MaxWidth 相依性屬性。

MinWidthProperty

識別 MinWidth 相依性屬性。

SortDirectionProperty

識別 SortDirection 相依性屬性。

SortMemberPathProperty

識別 SortMemberPath 相依性屬性。

VisibilityProperty

識別 Visibility 相依性屬性。

WidthProperty

識別 Width 相依性屬性。

屬性

ActualWidth

取得資料行的目前寬度,以裝置獨立單位為單位, (每單位 1/96 英吋) 。

CanUserReorder

取得或設定值,該值指出使用者是否可藉由拖曳欄標題來變更欄顯示位置。

CanUserResize

取得或設定值,這個值表示使用者是否可以使用滑鼠來調整資料行寬度。

CanUserSort

取得或設定值,該值指出使用者是否可藉由按一下欄標題來排序欄。

CellStyle

取得或設定用於呈現資料行中儲存格的樣式。

ClipboardContentBinding

取得或設定當取得或設定剪貼簿的儲存格內容時,要使用的繫結物件。

DataGridOwner

取得包含此資料行的 DataGrid 控制項。

DependencyObjectType

取得包裝 DependencyObjectType 這個實例 CLR 型別的 。

(繼承來源 DependencyObject)
Dispatcher

取得與這個 Dispatcher 關聯的 DispatcherObject

(繼承來源 DispatcherObject)
DisplayIndex

取得或設定相對於 DataGrid 中之其他資料行的資料行位置。

DragIndicatorStyle

取得或設定在拖曳作業期間要套用至資料行標題的樣式物件。

Header

取得或設定欄標題的內容。

HeaderStringFormat

取得或設定格式模式,以套用到欄標題的內容。

HeaderStyle

取得或設定呈現欄標題時所用的樣式。

HeaderTemplate

取得或設定範本,以定義欄標題的視覺表示方式。

HeaderTemplateSelector

取得或設定物件,以選取要用於欄標題的範本。

IsAutoGenerated

取得值,這個值會指出資料行是否自動產生。

IsFrozen

取得值,這個值會指出資料行是否會避免水平捲動。

IsReadOnly

取得或設定值,該值指出是否可編輯欄中的儲存格。

IsSealed

取得值,這個值表示此執行個體目前是否已密封 (唯讀)。

(繼承來源 DependencyObject)
MaxWidth

取得或設定資料行的最大寬度條件約束。

MinWidth

取得或設定資料行的最小寬度條件約束。

SortDirection

取得或設定欄的排序方向 (遞增或遞減)。

SortMemberPath

取得或設定屬性名稱或以句號分隔的屬性名稱階層,要當做排序依據成員。

Visibility

取得或設定欄的可見性。

Width

取得或設定欄寬或自動調整模式。

方法

CancelCellEdit(FrameworkElement, Object)

造成正在編輯的儲存格還原成原始、未編輯的值。

CheckAccess()

判斷呼叫的執行是否可以存取這個 DispatcherObject

(繼承來源 DispatcherObject)
ClearValue(DependencyProperty)

清除屬性的區域數值。 要清除的屬性是由 DependencyProperty 識別項所指定。

(繼承來源 DependencyObject)
ClearValue(DependencyPropertyKey)

清除唯讀屬性的區域數值。 要清除的屬性是由 DependencyPropertyKey 所指定。

(繼承來源 DependencyObject)
CoerceValue(DependencyProperty)

強制轉型所指定相依性屬性的值。 完成方式是叫用存在於呼叫 DependencyObject 之相依性屬性的屬性中繼資料中所指定的任何 CoerceValueCallback 函式。

(繼承來源 DependencyObject)
CommitCellEdit(FrameworkElement)

在結束儲存格編輯模式之前執行任何必要的驗證。

Equals(Object)

判斷提供的 DependencyObject 和目前的 DependencyObject 是否相等。

(繼承來源 DependencyObject)
GenerateEditingElement(DataGridCell, Object)

在衍生類別中覆寫時,取得繫結至資料行之 Binding 屬性值的編輯項目。

GenerateElement(DataGridCell, Object)

在衍生類別中覆寫時,取得繫結至資料行之 Binding 屬性值的唯讀項目。

GetCellContent(DataGridRow)

針對位於這個資料行與所指定資料列交集處的儲存格,擷取該儲存格的 Content 屬性值。

GetCellContent(Object)

如果儲存格與這個資料行以及表示指定之資料項目的資料列相交,則取得該儲存格的 Content 屬性值。

GetHashCode()

取得這個 DependencyObject 的雜湊碼。

(繼承來源 DependencyObject)
GetLocalValueEnumerator()

建立特定的列舉值,以判斷哪些相依性屬性在此 DependencyObject 上具有本機設定的值。

(繼承來源 DependencyObject)
GetType()

取得目前執行個體的 Type

(繼承來源 Object)
GetValue(DependencyProperty)

傳回 DependencyObject 的這個執行個體上之相依性屬性的目前有效值。

(繼承來源 DependencyObject)
InvalidateProperty(DependencyProperty)

重新評估指定相依性屬性的有效值。

(繼承來源 DependencyObject)
MemberwiseClone()

建立目前 Object 的淺層複製。

(繼承來源 Object)
NotifyPropertyChanged(String)

通知包含此資料行的 DataGrid,資料行屬性已變更。

OnCoerceIsReadOnly(Boolean)

根據包含此資料行之 IsReadOnly 的屬性規則,判斷 DataGrid 屬性的值。

OnCopyingCellClipboardContent(Object)

引發 CopyingCellClipboardContent 事件。

OnPastingCellClipboardContent(Object, Object)

引發 PastingCellClipboardContent 事件。

OnPropertyChanged(DependencyPropertyChangedEventArgs)

每當這個 DependencyObject 上任何相依性屬性的有效值已更新時叫用。 已變更的特定相依性屬性會在事件資料中報告。

(繼承來源 DependencyObject)
PrepareCellForEdit(FrameworkElement, RoutedEventArgs)

在衍生類別中覆寫時,根據編輯需要來設定儲存格內容。

ReadLocalValue(DependencyProperty)

傳回相依性屬性的區域值 (如果存在)。

(繼承來源 DependencyObject)
RefreshCellContent(FrameworkElement, String)

在衍生類別中覆寫時,會更新資料行中儲存格的內容,以回應變更的資料行屬性值。

SetCurrentValue(DependencyProperty, Object)

設定相依性屬性的值,而不需要變更其值來源。

(繼承來源 DependencyObject)
SetValue(DependencyProperty, Object)

設定相依性屬性的區域值 (由相依性屬性的識別碼所指定)。

(繼承來源 DependencyObject)
SetValue(DependencyPropertyKey, Object)

設定唯讀相依性屬性的區域數值 (由相依性屬性的 DependencyPropertyKey 識別項所指定)。

(繼承來源 DependencyObject)
ShouldSerializeProperty(DependencyProperty)

傳回值,這個值表示序列化程序是否應該序列化所提供相依性屬性的值。

(繼承來源 DependencyObject)
ToString()

傳回代表目前物件的字串。

(繼承來源 Object)
VerifyAccess()

請強制執行可以存取這個 DispatcherObject 的呼叫執行緒。

(繼承來源 DispatcherObject)

事件

CopyingCellClipboardContent

發生於準備好儲存格剪貼簿內容之後。

PastingCellClipboardContent

發生在將 [剪貼簿] 內容移至儲存格之前。

適用於

另請參閱