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:
authorMarius Ungureanu <marius.ungureanu@xamarin.com>2022-08-16 20:22:32 +0300
committerGitHub <noreply@github.com>2022-08-16 20:22:32 +0300
commitf2a8d483bce179404be4f2165390605c9618a4ec (patch)
tree59408ba7c5d3421b0b2607971bf5e31fefe595e4
parent282fb752af11ab66b35661111360028e27d7fa3d (diff)
parentb45a451fe18b3f55966ef8ab069876b9cc6d85be (diff)
Merge pull request #1105 from mono/Therzok-patch-2
-rw-r--r--Xwt.XamMac/Xwt.Mac/TreeViewBackend.cs10
1 files changed, 6 insertions, 4 deletions
diff --git a/Xwt.XamMac/Xwt.Mac/TreeViewBackend.cs b/Xwt.XamMac/Xwt.Mac/TreeViewBackend.cs
index 08f2bbfc..e0c96559 100644
--- a/Xwt.XamMac/Xwt.Mac/TreeViewBackend.cs
+++ b/Xwt.XamMac/Xwt.Mac/TreeViewBackend.cs
@@ -41,26 +41,28 @@ namespace Xwt.Mac
class TreeDelegate: NSOutlineViewDelegate
{
+ static readonly NSObject ObjectKey = new NSString("NSObject");
+
public TreeViewBackend Backend;
public override void ItemDidExpand (NSNotification notification)
{
- Backend.EventSink.OnRowExpanded (((TreeItem)notification.UserInfo["NSObject"]).Position);
+ Backend.EventSink.OnRowExpanded (((TreeItem)notification.UserInfo[ObjectKey]).Position);
}
public override void ItemWillExpand (NSNotification notification)
{
- Backend.EventSink.OnRowExpanding (((TreeItem)notification.UserInfo["NSObject"]).Position);
+ Backend.EventSink.OnRowExpanding (((TreeItem)notification.UserInfo[ObjectKey]).Position);
}
public override void ItemDidCollapse (NSNotification notification)
{
- Backend.EventSink.OnRowCollapsed (((TreeItem)notification.UserInfo["NSObject"]).Position);
+ Backend.EventSink.OnRowCollapsed (((TreeItem)notification.UserInfo[ObjectKey]).Position);
}
public override void ItemWillCollapse (NSNotification notification)
{
- Backend.EventSink.OnRowCollapsing (((TreeItem)notification.UserInfo["NSObject"]).Position);
+ Backend.EventSink.OnRowCollapsing (((TreeItem)notification.UserInfo[ObjectKey]).Position);
}
public override nfloat GetRowHeight (NSOutlineView outlineView, NSObject item)