語言

DataGridColumn.DragIndicatorStyle 屬性

定義

在拖曳操作中取得或設定樣式物件套用到欄位標頭。

public:
 property System::Windows::Style ^ DragIndicatorStyle { System::Windows::Style ^ get(); void set(System::Windows::Style ^ value); };
public System.Windows.Style DragIndicatorStyle { get; set; }
member this.DragIndicatorStyle : System.Windows.Style with get, set
Public Property DragIndicatorStyle As Style

屬性值

在拖曳操作時套用到欄位標頭的樣式物件。 註冊預設為 null。 關於影響該值的因素,請參見 DependencyProperty。

備註

使用此屬性設定 中單一欄位DragIndicatorStyle的 。DataGrid 要定義 a Style 作為阻力指示器,請指定 a TargetType 為 Control。

你可以在樣式中設定屬性,改變拖曳指示器某些元素的外觀,例如欄位標題周圍的邊框。 然而,拖曳指示器的預設範本會用 a VisualBrush 來繪 Canvas 製原始欄位標頭的圖片。 因此,如果你在風格中設定某些屬性,例如 Background 或 Foreground,它們看起來會顯示未被套用。 若要在拖曳欄位標頭時改變外觀,請套用一個不使用預設 VisualBrush的新模板。

適用於

另請參閱