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:
authorVsevolod Kukol <sevoku@microsoft.com>2018-03-09 18:20:38 +0300
committerVsevolod Kukol <sevoku@microsoft.com>2018-03-09 18:20:38 +0300
commitdc6d2eebe8e87d77f2777658fc302ce8f1655455 (patch)
treea05980530cde1d491a8e908f08e1ad71120f7660 /TestApps
parent11396af4934727738cccc4cbf2533777316a58ee (diff)
Improve TreeViewEvents example
Diffstat (limited to 'TestApps')
-rw-r--r--TestApps/Samples/Samples/TreeViewEvents.cs11
1 files changed, 9 insertions, 2 deletions
diff --git a/TestApps/Samples/Samples/TreeViewEvents.cs b/TestApps/Samples/Samples/TreeViewEvents.cs
index e019df8e..7b6f9f0e 100644
--- a/TestApps/Samples/Samples/TreeViewEvents.cs
+++ b/TestApps/Samples/Samples/TreeViewEvents.cs
@@ -40,8 +40,15 @@ namespace Samples
var tree = new TreeView (store);
tree.HeadersVisible = false;
tree.SelectionMode = SelectionMode.None;
-
- var col = new ListViewColumn ();
+ tree.AnimationsEnabled = false;
+ tree.ButtonPressed += (s, e) =>
+ {
+ // disable internal selection/dragging logic, which might collide with the mouse handling in this example
+ if (e.Button == PointerButton.Left)
+ e.Handled = true;
+ };
+
+ var col = new ListViewColumn () { Expands = true };
var cellView = new ExpandableTextCellView ();
cellView.NodeField = nodeField;
col.Views.Add (cellView, true);