语言

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 具有正在拖动的原始列标题的图像。 因此,如果在样式中设置某些属性(例如 Background ,或 Foreground)它们似乎未应用。 若要在拖动列标题时更改列标题的外观,请应用不使用默认值 VisualBrush的新模板。

适用于