Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/xwt.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Sorokin <v-alsoro@microsoft.com>2017-11-10 09:58:29 +0300
committerAlexander Sorokin <v-alsoro@microsoft.com>2017-11-17 15:07:56 +0300
commitee9009b6f02ddc179e4078732c941feb664dc6de (patch)
tree2a7e411291d24a1bf6e85b9afd407d57a42f2ba7 /TestApps
parent11bc60af9b02eaa45d0956872cdaf0460eb224be (diff)
[WPF] Fixed "drag image must be set before starting drag operation" exception in "TreeViews" sample
Diffstat (limited to 'TestApps')
-rw-r--r--TestApps/Samples/Samples/TreeViews.cs3
1 files changed, 3 insertions, 0 deletions
diff --git a/TestApps/Samples/Samples/TreeViews.cs b/TestApps/Samples/Samples/TreeViews.cs
index b2a3d02d..ba323f3a 100644
--- a/TestApps/Samples/Samples/TreeViews.cs
+++ b/TestApps/Samples/Samples/TreeViews.cs
@@ -25,6 +25,7 @@
// THE SOFTWARE.
using System;
using Xwt;
+using Xwt.Drawing;
namespace Samples
{
@@ -147,6 +148,8 @@ namespace Samples
view.DragStarted += delegate(object sender, DragStartedEventArgs e) {
var val = store.GetNavigatorAt (view.SelectedRow).GetValue (text);
e.DragOperation.Data.AddValue (val);
+ var img = Image.FromResource(GetType(), "class.png");
+ e.DragOperation.SetDragImage(img, (int)img.Size.Width, (int)img.Size.Height);
e.DragOperation.Finished += delegate(object s, DragFinishedEventArgs args) {
Console.WriteLine ("D:" + args.DeleteSource);
};