C# Class Yuhan.WPF.DragDrop.DragDropFrameworkData.StringToCanvasTextBlock

This data consumer looks for an object of type string. When the item is dropped, a TextBlock is created with its text initialized to the contents of the data string. The TextBlock's origin is placed on the canvas at the point where the string was dropped.
Inheritance: Yuhan.WPF.DragDrop.DragDropFramework.DataConsumerBase, IDataConsumer
Afficher le fichier Open project: hansuky/Yuhan Class Usage Examples

Méthodes publiques

Méthode Description
DropTarget_DragEnter ( object sender, System.Windows.DragEventArgs e ) : void
DropTarget_DragOver ( object sender, System.Windows.DragEventArgs e ) : void
DropTarget_Drop ( object sender, System.Windows.DragEventArgs e ) : void
StringToCanvasTextBlock ( string dataFormats ) : System

Create a string data consumer for a canvas

Private Methods

Méthode Description
DragOverOrDrop ( bool bDrop, object sender, System.Windows.DragEventArgs e ) : void

First determine whether the drag data is supported. Finally handle the actual drop when bDrop is true by creating a new TextBlock and initializing its Text property to the value of the string. The TextBlock is placed on the canvas such that its origin is at the point when the string was dropped.

Method Details

DropTarget_DragEnter() public méthode

public DropTarget_DragEnter ( object sender, System.Windows.DragEventArgs e ) : void
sender object
e System.Windows.DragEventArgs
Résultat void

DropTarget_DragOver() public méthode

public DropTarget_DragOver ( object sender, System.Windows.DragEventArgs e ) : void
sender object
e System.Windows.DragEventArgs
Résultat void

DropTarget_Drop() public méthode

public DropTarget_Drop ( object sender, System.Windows.DragEventArgs e ) : void
sender object
e System.Windows.DragEventArgs
Résultat void

StringToCanvasTextBlock() public méthode

Create a string data consumer for a canvas
public StringToCanvasTextBlock ( string dataFormats ) : System
dataFormats string A data format whose data is of type string
Résultat System