-
-
Save chamons/b6bc277c78ca60198e8567ea74dd3f58 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using AppKit; | |
using CoreGraphics; | |
using Foundation; | |
namespace XamarinMacMojaveTest2 | |
{ | |
[Register("AppDelegate")] | |
public class AppDelegate : NSApplicationDelegate | |
{ | |
MyViewTest outlineViewTest; | |
public override void DidFinishLaunching(NSNotification notification) | |
{ | |
outlineViewTest = new MyViewTest (); | |
} | |
} | |
public class MyViewTest : NSObject | |
{ | |
NSWindow Window; | |
NSOutlineView Outline; | |
public MyViewTest () | |
{ | |
NSWindowStyle windowStyle = NSWindowStyle.Closable | NSWindowStyle.Miniaturizable | NSWindowStyle.Resizable | NSWindowStyle.Titled; | |
Window = new NSWindow (new CGRect (100, 100, 500, 500), windowStyle, NSBackingStore.Buffered, false); | |
NSView outlineView = MakeView (Window.ContentView.Bounds); | |
Window.ContentView.AddSubview (outlineView); | |
Window.MakeKeyAndOrderFront (this); | |
} | |
NSView MakeView (CGRect frame) | |
{ | |
Outline = new NSOutlineView (frame); | |
NSScrollView scrollView = new NSScrollView (frame); | |
scrollView.DocumentView = Outline; | |
return scrollView; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment