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 。 若要定義 Style 拖曳指示器的 ,請指定 TargetTypeControl

您可以在樣式中設定屬性,以變更拖曳指示器的特定元素外觀,例如資料行標題周圍的框線。 不過,拖曳指標的預設範本會使用 VisualBrush 來繪製 Canvas ,其中包含正在拖曳之原始資料行標頭的影像。 因此,如果您在樣式中設定某些屬性,例如 BackgroundForeground ,它們將似乎不會套用。 若要在拖曳資料行標頭時變更其外觀,請套用未使用預設 VisualBrush 的新範本。

適用於

另請參閱