DataGrid.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

備註

若要定義 Style 拖曳指示器的 ,請指定 TargetTypeControl

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

適用於