DataGridColumn.DragIndicatorStyle DataGridColumn.DragIndicatorStyle DataGridColumn.DragIndicatorStyle DataGridColumn.DragIndicatorStyle Property

Definition

Gets or sets the style object to apply to the column header during a drag operation.

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

Property Value

The style object to apply to the column header during a drag operation. The registered default is null. For information about what can influence the value, see DependencyProperty.

Remarks

Use this property to set the DragIndicatorStyle for an individual column in the DataGrid. To define a Style for the drag indicator, specify a TargetType of Control.

You can set properties in the style to change the appearance of certain elements of the drag indicator, such as the border around the column header. However, the default template for the drag indicator uses a VisualBrush to paint a Canvas with an image of the original column header that is being dragged. As a result, if you set some properties in your style, such as Background or Foreground, they will appear to not be applied. To change the appearance of the column header while it is being dragged, apply a new template that does not use the default VisualBrush.

Applies to

See also