Class TreeViewDragCue
The visual object used as a DragCue in the TreeView.
Inherited Members
Namespace: Telerik.Windows.Controls.TreeView
Assembly: Telerik.Windows.Controls.Navigation.dll
Syntax
public class TreeViewDragCue : ItemsControl
Remarks
This visual can be used when as a DragCue outside the TreeView
as well, All its properties and methods are public.
Constructors
TreeViewDragCue()
Initializes a new instance of the TreeViewDragCue class.
Declaration
public TreeViewDragCue()
Fields
DragActionContentProperty
Identifies the DragActionContent property.
Declaration
public static readonly DependencyProperty DragActionContentProperty
Field Value
System.Windows.DependencyProperty
|
DragActionContentTemplateProperty
Identifies the DragActionContentTemplate property.
Declaration
public static readonly DependencyProperty DragActionContentTemplateProperty
Field Value
System.Windows.DependencyProperty
|
DragPreviewVisibilityProperty
Identifies the DragPreviewVisibility property.
Declaration
public static readonly DependencyProperty DragPreviewVisibilityProperty
Field Value
System.Windows.DependencyProperty
|
DragTooltipContentProperty
Identifies the DragTooltipContent property.
Declaration
public static readonly DependencyProperty DragTooltipContentProperty
Field Value
System.Windows.DependencyProperty
|
DragTooltipContentTemplateProperty
Identifies the DragTooltipContentTemplate property.
Declaration
public static readonly DependencyProperty DragTooltipContentTemplateProperty
Field Value
System.Windows.DependencyProperty
|
DragTooltipVisibilityProperty
Identifies the DragTooltipVisibility property.
Declaration
public static readonly DependencyProperty DragTooltipVisibilityProperty
Field Value
System.Windows.DependencyProperty
|
DropImpossibleIconProperty
Identifies the DropImpossibleIcon property.
Declaration
public static readonly DependencyProperty DropImpossibleIconProperty
Field Value
System.Windows.DependencyProperty
|
DropImpossibleIconTemplateProperty
Identifies the DropImpossibleIcon property.
Declaration
public static readonly DependencyProperty DropImpossibleIconTemplateProperty
Field Value
System.Windows.DependencyProperty
|
DropPossibleIconProperty
Identifies the DropPossibleIcon property.
Declaration
public static readonly DependencyProperty DropPossibleIconProperty
Field Value
System.Windows.DependencyProperty
|
DropPossibleIconTemplateProperty
Identifies the DropPossibleIconTemplate property.
Declaration
public static readonly DependencyProperty DropPossibleIconTemplateProperty
Field Value
System.Windows.DependencyProperty
|
IsDropPossibleProperty
Identifies the IsDropPossible property.
Declaration
public static readonly DependencyProperty IsDropPossibleProperty
Field Value
System.Windows.DependencyProperty
|
Properties
DragActionContent
Gets or sets the content that will appear in the DragCue and is meant to represent the possible drop action. This is a dependency property.
Declaration
public object DragActionContent { get; set; }
Property Value
System.Object
|
DragActionContentTemplate
Gets or sets the template for the DragActionContent. This is a dependency property.
Declaration
public DataTemplate DragActionContentTemplate { get; set; }
Property Value
System.Windows.DataTemplate
|
DragPreviewVisibility
Gets or sets the visibility of the area showing a the dragged items. This is a dependency property.
Declaration
public Visibility DragPreviewVisibility { get; set; }
Property Value
System.Windows.Visibility
|
DragTooltipContent
Gets or sets the content that will appear in the tooltip of the DragCue. Often this is the destination item is placed here. This is a dependency property.
Declaration
public object DragTooltipContent { get; set; }
Property Value
System.Object
|
DragTooltipContentTemplate
Gets or sets the data template for the DragTooltip content. This is a dependency property.
Declaration
public DataTemplate DragTooltipContentTemplate { get; set; }
Property Value
System.Windows.DataTemplate
|
DragTooltipVisibility
Gets or sets the visibility of the tooltip showing an icon, action text and a preview of the destination. This is a dependency property.
Declaration
public Visibility DragTooltipVisibility { get; set; }
Property Value
System.Windows.Visibility
|
DropImpossibleIcon
Gets or sets the content that will appear as an icon when the a drop is not possible. This is a dependency property.
Declaration
public object DropImpossibleIcon { get; set; }
Property Value
System.Object
|
DropImpossibleIconTemplate
Gets or sets the data template of the object that will be shown when a drop is not possible. This is a dependency property.
Declaration
public DataTemplate DropImpossibleIconTemplate { get; set; }
Property Value
System.Windows.DataTemplate
|
DropPossibleIcon
Gets or sets the content that will appear as an icon when the a drop is possible. This is a dependency property.
Declaration
public object DropPossibleIcon { get; set; }
Property Value
System.Object
|
DropPossibleIconTemplate
Gets or sets the data template of the object that will be shown when a drop is possible. This is a dependency property.
Declaration
public DataTemplate DropPossibleIconTemplate { get; set; }
Property Value
System.Windows.DataTemplate
|
IsDropPossible
Gets or sets a value indicating whether a drop is possible. This value only changes the DragCue and may not be related to whether a drop could actually happen. This is a dependency property.
Declaration
public bool IsDropPossible { get; set; }
Property Value
System.Boolean
|
Methods
ChangeVisualState(Boolean)
Updates the visual state of the control.
Declaration
protected override void ChangeVisualState(bool useTransitions)
Parameters
System.Boolean
useTransitions
Indicates whether transitions should be used. |
Overrides
GetNonVisualRepresentation(Object)
Return a non-visual representation of an item. This is helpful when DragPreview of visual items needs to be shown.
Declaration
public static object GetNonVisualRepresentation(object item)
Parameters
System.Object
item
The item to return non-visual representation for. |
Returns
System.Object
A non-visual representation of an item. |
Remarks
The NonVisual representation will fallback like so, trying to return:
OnApplyTemplate()
When overridden in a derived class, is invoked whenever application code or internal processes (such as a rebuilding layout pass) call System.Windows.Controls.Control.ApplyTemplate.
Declaration
public override void OnApplyTemplate()
Overrides
SetSafeItemsSource(IEnumerable)
Sets the ItemsSource, extract non-visual representation of all visual items to avoid errors.
Declaration
public void SetSafeItemsSource(IEnumerable itemsSource)
Parameters
System.Collections.IEnumerable
itemsSource
The items that will be shown in the preview area. |
Remarks
Since visual items cannot be present at two places at the same time, this method will assign an ItemsSource but before that it will try to find a non-visual representation of the visual items.
If the items are non-visual, it keeps them. Then it checks for explicit DataContext of the item. If it has one, it uses it. Then, it checks for the TextSearch.Text property. If it is not set, it returns the ToString() of the item.
Please note that the method does a collection-equals check for and it will not replace the current ItemsSource if the same items are in the new and the old collection. This means that a new ItemsSource will not be set if the new items are just a rearrangement of the old.