DataGridComboBoxColumn DataGridComboBoxColumn DataGridComboBoxColumn DataGridComboBoxColumn Class

定義

表示將 DataGrid 控制項裝載於其儲存格內的 ComboBox 資料行。Represents a DataGrid column that hosts ComboBox controls in its cells.

public ref class DataGridComboBoxColumn : System::Windows::Controls::DataGridColumn
public class DataGridComboBoxColumn : System.Windows.Controls.DataGridColumn
type DataGridComboBoxColumn = class
    inherit DataGridColumn
Public Class DataGridComboBoxColumn
Inherits DataGridColumn
繼承

範例

下列範例示範如何使用列舉值, 在資料行中填入每ComboBox個的下拉式清單。The following example shows how to populate the drop-down list for each ComboBox in the column with the values of an enumeration. 下拉式清單中選取的專案會藉由將SelectedItemBinding屬性設定為每個資料列中所顯示之物件的屬性來系結。The selected item in the drop-down list is bound by setting the SelectedItemBinding property to the property of the object displayed in each row.

<NavigationWindow x:Class="DataGrid_CustomColumns.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:core="clr-namespace:System;assembly=mscorlib"
    xmlns:local="clr-namespace:DataGrid_CustomColumns"
    Title="Customers" Height="300" Width="300" ShowsNavigationUI="False"  >
    
<NavigationWindow.Resources>
    <!--Create list of enumeration values-->
    <ObjectDataProvider x:Key="myEnum" MethodName="GetValues" ObjectType="{x:Type core:Enum}">
        <ObjectDataProvider.MethodParameters>
            <x:Type Type="local:OrderStatus"/>
        </ObjectDataProvider.MethodParameters>
    </ObjectDataProvider>
    <!--Create an instance of the converter for Email-->
    <local:EmailConverter x:Key="EmailConverter" />
</NavigationWindow.Resources>
<NavigationWindow.Content>  
    
<Grid>
    <DataGrid Name="DG1" ItemsSource="{Binding}" AutoGenerateColumns="False" >
        <DataGrid.Columns>
                <DataGridComboBoxColumn Header="Order Status"  SelectedItemBinding="{Binding Status}" ItemsSource="{Binding Source={StaticResource myEnum}}" />
            </DataGrid.Columns>
        </DataGrid>
    </Grid>
    </NavigationWindow.Content>
</NavigationWindow>
public partial class Window1 : NavigationWindow
{
Class Window1
public Window1()
{
    InitializeComponent();

    //GetData() creates a collection of Customer data from a database
    ObservableCollection<Customer> custdata = GetData();
    
    //Bind the DataGrid to the customer data
    DG1.DataContext = custdata;
   
}
Public Sub New()
    ' This call is required by the Windows Form Designer.
    InitializeComponent()
    ' Add any initialization after the InitializeComponent() call.

    'GetData() creates a collection of Customer data from a database
    Dim custdata As ObservableCollection(Of Customer) = GetData()

    'Bind the DataGrid to the customer data
    DG1.DataContext = custdata

End Sub
//Defines the customer object
public class Customer
{
    public string FirstName { get; set; }
    public string LastName { get; set; }
    public Uri Email { get; set; }
    public bool IsMember { get; set; }
    public OrderStatus Status { get; set; }

}
'Defines the customer object
Public Class Customer
    Public Property FirstName() As String
    Public Property LastName() As String
    Public Property Email() As Uri
    Public Property IsMember() As Boolean
    Public Property Status() As OrderStatus
End Class
public enum OrderStatus { None, New, Processing, Shipped, Received };
Public Enum OrderStatus
    None
    [New]
    Processing
    Shipped
    Received
End Enum

備註

DataGridComboBoxColumn來顯示資料, 其中有一組可供選擇的專案, 例如列舉。Use DataGridComboBoxColumn to display data where there is a set of items to choose from, such as an enumeration. DataGridComboBoxColumn可讓使用者從下拉式清單中選取專案。DataGridComboBoxColumn allows users to select an item from a drop-down list. 下圖顯示DataGridComboBoxColumnThe following illustration shows a DataGridComboBoxColumn.

DataGridComboBoxColumnA DataGridComboBoxColumn

若要填入下拉式清單, 請先使用下列其中ItemsSource一個選項來ComboBox設定的屬性:To populate the drop-down list, first set the ItemsSource property for the ComboBox by using one of the following options:

一旦設定之後, ComboBox 就會將中選取的專案系結至儲存格所在資料列的資料項目。ItemsSourceOnce the ItemsSource is set, bind the selected item in the ComboBox to the data item for the row that the cell is in. 您可以使用下列其中一個屬性來設定系結:You can set the binding by using one of the following properties:

屬性Property 說明Description
TextBinding 設定目前所選取專案之文字的系結路徑。Sets the binding path of the text for the currently selected item.
SelectedItemBinding 設定目前選取之物件的系結路徑。Sets the binding path of the object that is currently selected.
SelectedValueBinding 將系結路徑設定為SelectedValuePath屬性所指定之選取專案的值。Sets the binding path to the value of the selected item specified by the SelectedValuePath property.

當屬性設定為true時, 使用者將無法編輯資料行, 也無法看到下拉式清單。 IsReadOnlyWhen the IsReadOnly property is set to true, users cannot edit the column and they will not be able to see the drop-down list.

如果您想要顯示其他類型的資料, DataGrid會提供下列資料行類型:If you want to display other types of data, DataGrid provides the following column types:

資料行型別Column Type 資料顯示Data Display
DataGridHyperlinkColumn 用來顯示 URI 資料。Use to display URI data.
DataGridCheckBoxColumn 用來顯示布林資料。Use to display Boolean data.
DataGridTextColumn 用來顯示文字。Use to display text.

如果您想要使用中的DataGrid其他控制項, 您可以使用DataGridTemplateColumn來建立自己的資料行類型。If you want to use other controls in your DataGrid, you can create your own column types by using DataGridTemplateColumn.

建構函式

DataGridComboBoxColumn() DataGridComboBoxColumn() DataGridComboBoxColumn() DataGridComboBoxColumn()

初始化 DataGridComboBoxColumn 類別的新執行個體。Initializes a new instance of the DataGridComboBoxColumn class.

欄位

DisplayMemberPathProperty DisplayMemberPathProperty DisplayMemberPathProperty DisplayMemberPathProperty

識別 DisplayMemberPath 相依性屬性。Identifies the DisplayMemberPath dependency property.

EditingElementStyleProperty EditingElementStyleProperty EditingElementStyleProperty EditingElementStyleProperty

識別 EditingElementStyle 相依性屬性。Identifies the EditingElementStyle dependency property.

ElementStyleProperty ElementStyleProperty ElementStyleProperty ElementStyleProperty

識別 ElementStyle 相依性屬性。Identifies the ElementStyle dependency property.

ItemsSourceProperty ItemsSourceProperty ItemsSourceProperty ItemsSourceProperty

識別 ItemsSource 相依性屬性。Identifies the ItemsSource dependency property.

SelectedValuePathProperty SelectedValuePathProperty SelectedValuePathProperty SelectedValuePathProperty

識別 SelectedValuePath 相依性屬性。Identifies the SelectedValuePath dependency property.

屬性

ActualWidth ActualWidth ActualWidth ActualWidth

取得資料行的目前寬度 (以 裝置獨立單位 (每單位 1/96 英吋)device-independent units (1/96th inch per unit) 為單位)。Gets the current width of the column, in 裝置獨立單位 (每單位 1/96 英吋)device-independent units (1/96th inch per unit).

(Inherited from DataGridColumn)
CanUserReorder CanUserReorder CanUserReorder CanUserReorder

取得或設定值,該值指出使用者是否可藉由拖曳欄標題來變更欄顯示位置。Gets or sets a value that indicates whether the user can change the column display position by dragging the column header.

(Inherited from DataGridColumn)
CanUserResize CanUserResize CanUserResize CanUserResize

取得或設定值,這個值表示使用者是否可以使用滑鼠來調整資料行寬度。Gets or sets a value that indicates whether the user can adjust the column width by using the mouse.

(Inherited from DataGridColumn)
CanUserSort CanUserSort CanUserSort CanUserSort

取得或設定值,該值指出使用者是否可藉由按一下欄標題來排序欄。Gets or sets a value that indicates whether the user can sort the column by clicking the column header.

(Inherited from DataGridColumn)
CellStyle CellStyle CellStyle CellStyle

取得或設定用於呈現資料行中儲存格的樣式。Gets or sets the style that is used to render cells in the column.

(Inherited from DataGridColumn)
ClipboardContentBinding ClipboardContentBinding ClipboardContentBinding ClipboardContentBinding

取得或設定當取得或設定剪貼簿的儲存格內容時,要使用的繫結物件。Gets or sets the binding object to use when getting or setting cell content for the clipboard.

DataGridOwner DataGridOwner DataGridOwner DataGridOwner

取得包含此資料行的 DataGrid 控制項。Gets the DataGrid control that contains this column.

(Inherited from DataGridColumn)
DefaultEditingElementStyle DefaultEditingElementStyle DefaultEditingElementStyle DefaultEditingElementStyle

取得 EditingElementStyle 屬性的預設值。Gets the default value of the EditingElementStyle property.

DefaultElementStyle DefaultElementStyle DefaultElementStyle DefaultElementStyle

取得 ElementStyle 的預設值。Gets the default value of the ElementStyle.

DependencyObjectType DependencyObjectType DependencyObjectType DependencyObjectType

取得包裝此執行個體之 CLRCLR 型別的 DependencyObjectTypeGets the DependencyObjectType that wraps the CLRCLR type of this instance.

(Inherited from DependencyObject)
Dispatcher Dispatcher Dispatcher Dispatcher

取得與這個 Dispatcher 關聯的 DispatcherObjectGets the Dispatcher this DispatcherObject is associated with.

(Inherited from DispatcherObject)
DisplayIndex DisplayIndex DisplayIndex DisplayIndex

取得或設定相對於 DataGrid 中之其他資料行的資料行位置。Gets or sets the display position of the column relative to the other columns in the DataGrid.

(Inherited from DataGridColumn)
DisplayMemberPath DisplayMemberPath DisplayMemberPath DisplayMemberPath

取得或設定來源物件上某值的路徑,以提供物件的視覺表示方式。Gets or sets a path to a value on the source object to provide the visual representation of the object.

DragIndicatorStyle DragIndicatorStyle DragIndicatorStyle DragIndicatorStyle

取得或設定在拖曳作業期間要套用至資料行標題的樣式物件。Gets or sets the style object to apply to the column header during a drag operation.

(Inherited from DataGridColumn)
EditingElementStyle EditingElementStyle EditingElementStyle EditingElementStyle

取得或設定樣式,當呈現資料行針對處於編輯模式之儲存格所顯示的項目時,會使用這個樣式。Gets or sets the style that is used when rendering the element that the column displays for a cell in editing mode.

ElementStyle ElementStyle ElementStyle ElementStyle

取得或設定樣式,當呈現資料行針對不處於編輯模式之儲存格所顯示的項目時,會使用這個樣式。Gets or sets the style that is used when rendering the element that the column displays for a cell that is not in editing mode.

Header Header Header Header

取得或設定欄標題的內容。Gets or sets the content of the column header.

(Inherited from DataGridColumn)
HeaderStringFormat HeaderStringFormat HeaderStringFormat HeaderStringFormat

取得或設定格式模式,以套用到欄標題的內容。Gets or sets the format pattern to apply to the content of the column header.

(Inherited from DataGridColumn)
HeaderStyle HeaderStyle HeaderStyle HeaderStyle

取得或設定呈現欄標題時所用的樣式。Gets or sets the style that is used when rendering the column header.

(Inherited from DataGridColumn)
HeaderTemplate HeaderTemplate HeaderTemplate HeaderTemplate

取得或設定範本,以定義欄標題的視覺表示方式。Gets or sets the template that defines the visual representation of the column header.

(Inherited from DataGridColumn)
HeaderTemplateSelector HeaderTemplateSelector HeaderTemplateSelector HeaderTemplateSelector

取得或設定物件,以選取要用於欄標題的範本。Gets or sets the object that selects which template to use for the column header.

(Inherited from DataGridColumn)
IsAutoGenerated IsAutoGenerated IsAutoGenerated IsAutoGenerated

取得值,這個值會指出資料行是否自動產生。Gets a value that indicates whether the column is auto-generated.

(Inherited from DataGridColumn)
IsFrozen IsFrozen IsFrozen IsFrozen

取得值,這個值會指出資料行是否會避免水平捲動。Gets a value that indicates whether the column is prevented from scrolling horizontally.

(Inherited from DataGridColumn)
IsReadOnly IsReadOnly IsReadOnly IsReadOnly

取得或設定值,該值指出是否可編輯欄中的儲存格。Gets or sets a value that indicates whether cells in the column can be edited.

(Inherited from DataGridColumn)
IsSealed IsSealed IsSealed IsSealed

取得值,這個值表示此執行個體目前是否已密封 (唯讀)。Gets a value that indicates whether this instance is currently sealed (read-only).

(Inherited from DependencyObject)
ItemsSource ItemsSource ItemsSource ItemsSource

取得或設定用來產生下拉式方塊控制項內容的集合。Gets or sets a collection that is used to generate the content of the combo box control.

MaxWidth MaxWidth MaxWidth MaxWidth

取得或設定資料行的最大寬度條件約束。Gets or sets the maximum width constraint of the column.

(Inherited from DataGridColumn)
MinWidth MinWidth MinWidth MinWidth

取得或設定資料行的最小寬度條件約束。Gets or sets the minimum width constraint of the column.

(Inherited from DataGridColumn)
SelectedItemBinding SelectedItemBinding SelectedItemBinding SelectedItemBinding

取得或設定目前選取項目的繫結。Gets or sets the binding for the currently selected item.

SelectedValueBinding SelectedValueBinding SelectedValueBinding SelectedValueBinding

取得或設定所選取項目的值,這個值是藉由使用 SelectedValuePath 而取得。Gets or sets the value of the selected item, obtained by using SelectedValuePath.

SelectedValuePath SelectedValuePath SelectedValuePath SelectedValuePath

取得或設定路徑,這個路徑會用來從 SelectedValue 取得 SelectedItemGets or sets the path that is used to get the SelectedValue from the SelectedItem.

SortDirection SortDirection SortDirection SortDirection

取得或設定欄的排序方向 (遞增或遞減)。Gets or sets the sort direction (ascending or descending) of the column.

(Inherited from DataGridColumn)
SortMemberPath SortMemberPath SortMemberPath SortMemberPath

取得或設定屬性名稱或以句號分隔的屬性名稱階層,要當做排序依據成員。Gets or sets a property name, or a period-delimited hierarchy of property names, that indicates the member to sort by.

(Inherited from DataGridColumn)
TextBinding TextBinding TextBinding TextBinding

針對 ComboBox 控制項的文字方塊部分,取得或設定其中文字的繫結。Gets or sets the binding for the text in the text box portion of the ComboBox control.

TextBlockComboBoxStyleKey TextBlockComboBoxStyleKey TextBlockComboBoxStyleKey TextBlockComboBoxStyleKey

取得要套用至唯讀下拉式方塊之樣式的資源索引鍵。Gets the resource key for the style to apply to a read-only combo box.

Visibility Visibility Visibility Visibility

取得或設定欄的可見性。Gets or sets the visibility of the column.

(Inherited from DataGridColumn)
Width Width Width Width

取得或設定欄寬或自動調整模式。Gets or sets the column width or automatic sizing mode.

(Inherited from DataGridColumn)

方法

CancelCellEdit(FrameworkElement, Object) CancelCellEdit(FrameworkElement, Object) CancelCellEdit(FrameworkElement, Object) CancelCellEdit(FrameworkElement, Object)

造成正在編輯的資料行儲存格還原成指定的值。Causes the column cell being edited to revert to the specified value.

CheckAccess() CheckAccess() CheckAccess() CheckAccess()

判斷呼叫的執行是否可以存取這個 DispatcherObjectDetermines whether the calling thread has access to this DispatcherObject.

(Inherited from DispatcherObject)
ClearValue(DependencyProperty) ClearValue(DependencyProperty) ClearValue(DependencyProperty) ClearValue(DependencyProperty)

清除屬性的區域數值。Clears the local value of a property. 要清除的屬性是由 DependencyProperty 識別項所指定。The property to be cleared is specified by a DependencyProperty identifier.

(Inherited from DependencyObject)
ClearValue(DependencyPropertyKey) ClearValue(DependencyPropertyKey) ClearValue(DependencyPropertyKey) ClearValue(DependencyPropertyKey)

清除唯讀屬性的區域數值。Clears the local value of a read-only property. 要清除的屬性是由 DependencyPropertyKey 所指定。The property to be cleared is specified by a DependencyPropertyKey.

(Inherited from DependencyObject)
CoerceValue(DependencyProperty) CoerceValue(DependencyProperty) CoerceValue(DependencyProperty) CoerceValue(DependencyProperty)

強制轉型所指定相依性屬性的值。Coerces the value of the specified dependency property. 叫用存在於呼叫 CoerceValueCallback 上相依性屬性之屬性中繼資料內所指定的任何 DependencyObject 函式,就可以達到這一點。This is accomplished by invoking any CoerceValueCallback function specified in property metadata for the dependency property as it exists on the calling DependencyObject.

(Inherited from DependencyObject)
CommitCellEdit(FrameworkElement) CommitCellEdit(FrameworkElement) CommitCellEdit(FrameworkElement) CommitCellEdit(FrameworkElement)

在結束編輯模式之前執行任何必要的驗證。Performs any required validation before exiting the editing mode.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

判斷提供的 DependencyObject 和目前的 DependencyObject 是否相等。Determines whether a provided DependencyObject is equivalent to the current DependencyObject.

(Inherited from DependencyObject)
GenerateEditingElement(DataGridCell, Object) GenerateEditingElement(DataGridCell, Object) GenerateEditingElement(DataGridCell, Object) GenerateEditingElement(DataGridCell, Object)

取得下拉式方塊控制項,這個控制項繫結至資料行的 SelectedItemBindingSelectedValueBindingTextBinding 值。Gets a combo box control that is bound to the column's SelectedItemBinding, SelectedValueBinding, and TextBinding values.

GenerateElement(DataGridCell, Object) GenerateElement(DataGridCell, Object) GenerateElement(DataGridCell, Object) GenerateElement(DataGridCell, Object)

取得唯讀下拉式方塊控制項,這個控制項繫結至資料行的 SelectedItemBindingSelectedValueBindingTextBinding 值。Gets a read-only combo box control that is bound to the column's SelectedItemBinding, SelectedValueBinding, and TextBinding values.

GetCellContent(DataGridRow) GetCellContent(DataGridRow) GetCellContent(DataGridRow) GetCellContent(DataGridRow)

針對位於這個資料行與所指定資料列交集處的儲存格,擷取該儲存格的 Content 屬性值。Retrieves the Content property value for the cell at the intersection of this column and the specified row.

(Inherited from DataGridColumn)
GetCellContent(Object) GetCellContent(Object) GetCellContent(Object) GetCellContent(Object)

如果儲存格與這個資料行以及表示指定之資料項目的資料列相交,則取得該儲存格的 Content 屬性值。Gets the Content property value for the cell at the intersection of this column and the row that represents the specified data item.

(Inherited from DataGridColumn)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

取得這個 DependencyObject 的雜湊程式碼。Gets a hash code for this DependencyObject.

(Inherited from DependencyObject)
GetLocalValueEnumerator() GetLocalValueEnumerator() GetLocalValueEnumerator() GetLocalValueEnumerator()

建立特定的列舉值,以判斷哪些相依性屬性在此 DependencyObject 上具有本機設定的值。Creates a specialized enumerator for determining which dependency properties have locally set values on this DependencyObject.

(Inherited from DependencyObject)
GetType() GetType() GetType() GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(Inherited from Object)
GetValue(DependencyProperty) GetValue(DependencyProperty) GetValue(DependencyProperty) GetValue(DependencyProperty)

傳回 DependencyObject 的這個執行個體上之相依性屬性的目前有效值。Returns the current effective value of a dependency property on this instance of a DependencyObject.

(Inherited from DependencyObject)
InvalidateProperty(DependencyProperty) InvalidateProperty(DependencyProperty) InvalidateProperty(DependencyProperty) InvalidateProperty(DependencyProperty)

重新評估指定之相依性屬性的有效值。Re-evaluates the effective value for the specified dependency property

(Inherited from DependencyObject)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

建立目前 Object 的淺層複本 (Shallow Copy)。Creates a shallow copy of the current Object.

(Inherited from Object)
NotifyPropertyChanged(String) NotifyPropertyChanged(String) NotifyPropertyChanged(String) NotifyPropertyChanged(String)

通知包含此資料行的 DataGrid,資料行屬性已變更。Notifies the DataGrid that contains this column that a column property has changed.

(Inherited from DataGridColumn)
OnCoerceIsReadOnly(Boolean) OnCoerceIsReadOnly(Boolean) OnCoerceIsReadOnly(Boolean) OnCoerceIsReadOnly(Boolean)

根據包含此資料行之 IsReadOnly 的屬性規則,判斷 DataGrid 屬性的值。Determines the value of the IsReadOnly property based on property rules from the DataGrid that contains this column.

OnCopyingCellClipboardContent(Object) OnCopyingCellClipboardContent(Object) OnCopyingCellClipboardContent(Object) OnCopyingCellClipboardContent(Object)

引發 CopyingCellClipboardContent 事件。Raises the CopyingCellClipboardContent event.

(Inherited from DataGridColumn)
OnPastingCellClipboardContent(Object, Object) OnPastingCellClipboardContent(Object, Object) OnPastingCellClipboardContent(Object, Object) OnPastingCellClipboardContent(Object, Object)

引發 PastingCellClipboardContent 事件。Raises the PastingCellClipboardContent event.

(Inherited from DataGridColumn)
OnPropertyChanged(DependencyPropertyChangedEventArgs) OnPropertyChanged(DependencyPropertyChangedEventArgs) OnPropertyChanged(DependencyPropertyChangedEventArgs) OnPropertyChanged(DependencyPropertyChangedEventArgs)

每當這個 DependencyObject 上任何相依性屬性的有效值已更新時叫用。Invoked whenever the effective value of any dependency property on this DependencyObject has been updated. 已變更的特定相依性屬性會在事件資料中報告。The specific dependency property that changed is reported in the event data.

(Inherited from DependencyObject)
OnSelectedItemBindingChanged(BindingBase, BindingBase) OnSelectedItemBindingChanged(BindingBase, BindingBase) OnSelectedItemBindingChanged(BindingBase, BindingBase) OnSelectedItemBindingChanged(BindingBase, BindingBase)

DataGrid 屬性值變更時通知 SelectedItemBindingNotifies the DataGrid when the SelectedItemBinding property changes.

OnSelectedValueBindingChanged(BindingBase, BindingBase) OnSelectedValueBindingChanged(BindingBase, BindingBase) OnSelectedValueBindingChanged(BindingBase, BindingBase) OnSelectedValueBindingChanged(BindingBase, BindingBase)

DataGrid 屬性值變更時通知 SelectedValueBindingNotifies the DataGrid when the SelectedValueBinding property changes.

OnTextBindingChanged(BindingBase, BindingBase) OnTextBindingChanged(BindingBase, BindingBase) OnTextBindingChanged(BindingBase, BindingBase) OnTextBindingChanged(BindingBase, BindingBase)

DataGrid 屬性值變更時通知 TextBindingNotifies the DataGrid when the TextBinding property changes.

PrepareCellForEdit(FrameworkElement, RoutedEventArgs) PrepareCellForEdit(FrameworkElement, RoutedEventArgs) PrepareCellForEdit(FrameworkElement, RoutedEventArgs) PrepareCellForEdit(FrameworkElement, RoutedEventArgs)

在資料行中的儲存格進入編輯模式時呼叫。Called when a cell in the column enters editing mode.

ReadLocalValue(DependencyProperty) ReadLocalValue(DependencyProperty) ReadLocalValue(DependencyProperty) ReadLocalValue(DependencyProperty)

傳回相依性屬性的區域值 (如果存在)。Returns the local value of a dependency property, if it exists.

(Inherited from DependencyObject)
RefreshCellContent(FrameworkElement, String) RefreshCellContent(FrameworkElement, String) RefreshCellContent(FrameworkElement, String) RefreshCellContent(FrameworkElement, String)

為了回應繫結變更而重新整理資料行中的儲存格內容。Refreshes the contents of a cell in the column in response to a binding change.

SetCurrentValue(DependencyProperty, Object) SetCurrentValue(DependencyProperty, Object) SetCurrentValue(DependencyProperty, Object) SetCurrentValue(DependencyProperty, Object)

設定相依性屬性的值,而不需要變更其值來源。Sets the value of a dependency property without changing its value source.

(Inherited from DependencyObject)
SetValue(DependencyProperty, Object) SetValue(DependencyProperty, Object) SetValue(DependencyProperty, Object) SetValue(DependencyProperty, Object)

設定相依性屬性的區域值 (由相依性屬性的識別碼所指定)。Sets the local value of a dependency property, specified by its dependency property identifier.

(Inherited from DependencyObject)
SetValue(DependencyPropertyKey, Object) SetValue(DependencyPropertyKey, Object) SetValue(DependencyPropertyKey, Object) SetValue(DependencyPropertyKey, Object)

設定唯讀相依性屬性的區域數值 (由相依性屬性的 DependencyPropertyKey 識別項所指定)。Sets the local value of a read-only dependency property, specified by the DependencyPropertyKey identifier of the dependency property.

(Inherited from DependencyObject)
ShouldSerializeProperty(DependencyProperty) ShouldSerializeProperty(DependencyProperty) ShouldSerializeProperty(DependencyProperty) ShouldSerializeProperty(DependencyProperty)

傳回值,這個值表示序列化程序是否應該序列化所提供相依性屬性的值。Returns a value that indicates whether serialization processes should serialize the value for the provided dependency property.

(Inherited from DependencyObject)
ToString() ToString() ToString() ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

(Inherited from Object)
VerifyAccess() VerifyAccess() VerifyAccess() VerifyAccess()

請強制執行可以存取這個 DispatcherObject 的呼叫執行緒。Enforces that the calling thread has access to this DispatcherObject.

(Inherited from DispatcherObject)

事件

CopyingCellClipboardContent CopyingCellClipboardContent CopyingCellClipboardContent CopyingCellClipboardContent

發生於準備好儲存格剪貼簿內容之後。Occurs after the cell clipboard content is prepared.

(Inherited from DataGridColumn)
PastingCellClipboardContent PastingCellClipboardContent PastingCellClipboardContent PastingCellClipboardContent

發生在將 [剪貼簿] 內容移至儲存格之前。Occurs before the clipboard content is moved to the cell.

(Inherited from DataGridColumn)

適用於