DataGridColumn.CanUserReorder 屬性

定義

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

public:
 property bool CanUserReorder { bool get(); void set(bool value); };
public bool CanUserReorder { get; set; }
member this.CanUserReorder : bool with get, set
Public Property CanUserReorder As Boolean

屬性值

如果使用者可以將資料行行首拖曳到新的位置則為 true,否則為 falsetrue if the user can drag the column header to a new position; otherwise, false. 已註冊的預設值是 trueThe registered default is true. 如需哪些因素會影響值的詳細資訊,請參閱 DependencyPropertyFor information about what can influence the value, see DependencyProperty.

備註

您可以藉由設定DataGrid.CanUserReorderColumns屬性來設定所有資料行的重新排序行為。You can set this reorder behavior for all columns by setting the DataGrid.CanUserReorderColumns property. 如果同時DataGridColumn.CanUserReorder DataGrid.CanUserReorderColumns 設定了true屬性和屬性,的值會優先于的值。falseIf the DataGridColumn.CanUserReorder property and the DataGrid.CanUserReorderColumns property are both set, a value of false takes precedence over a value of true.

適用於

另請參閱