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:
Diffstat (limited to 'Xwt.XamMac/Xwt.Mac/TreeViewBackend.cs')
-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)