C# Class Eto.Forms.XamMac2Helpers

Datei anzeigen Open project: picoe/Eto

Private Properties

Property Type Description

Public Methods

Method Description
GetFieldEditor ( IntPtr clientHandle ) : NSObject

Gets the field editor required for the specified control.

When you are embedding an Eto control inside a native NSWindow, certain events for the TextBox and similar controls may not fire as they are handled through a custom field editor. You must wire up your native NSWindowDelegate to handle windowWillReturnFieldEditor:toObject: and call this method with the handle of the client object.

ToEto ( this view ) : Control

Wraps the specified view to an Eto control that can be used directly in Eto.Forms code.

ToEtoWindow ( this window ) : Window

Wraps the specified Cocoa window in an Eto control so it can be used as a parent when showing dialogs, etc.

ToNative ( this control, bool attach = false ) : MonoMac.AppKit.NSView

Gets the native Mac NSView that contains the Eto.Forms control.

Note for some controls, this will not be the 'main' native control. For example, a GridView on OS X will return a NSScrollView instead of a NSTableView, since the table view itself does not scroll. When you intend on using the control inside an existing native application, set attach to true so that it can prepare for attaching to the native application by sending OnPreLoad/Load/LoadComplete events.

ToNative ( this window ) : NSWindow

Gets the native NSWindow from a Window

Method Details

GetFieldEditor() public static method

Gets the field editor required for the specified control.
When you are embedding an Eto control inside a native NSWindow, certain events for the TextBox and similar controls may not fire as they are handled through a custom field editor. You must wire up your native NSWindowDelegate to handle windowWillReturnFieldEditor:toObject: and call this method with the handle of the client object.
public static GetFieldEditor ( IntPtr clientHandle ) : NSObject
clientHandle System.IntPtr Handle to the client object from the 2nd parameter of windowWillReturnFieldEditor:toObject:
return MonoMac.Foundation.NSObject

ToEto() public static method

Wraps the specified view to an Eto control that can be used directly in Eto.Forms code.
public static ToEto ( this view ) : Control
view this Native control to wrap.
return Control

ToEtoWindow() public static method

Wraps the specified Cocoa window in an Eto control so it can be used as a parent when showing dialogs, etc.
public static ToEtoWindow ( this window ) : Window
window this Cocoa Window to wrap.
return Window

ToNative() public static method

Gets the native Mac NSView that contains the Eto.Forms control.
Note for some controls, this will not be the 'main' native control. For example, a GridView on OS X will return a NSScrollView instead of a NSTableView, since the table view itself does not scroll. When you intend on using the control inside an existing native application, set attach to true so that it can prepare for attaching to the native application by sending OnPreLoad/Load/LoadComplete events.
public static ToNative ( this control, bool attach = false ) : MonoMac.AppKit.NSView
control this Control to get the native control for.
attach bool If set to true the control is to be attached to an existing application, or false to get the native control directly.
return MonoMac.AppKit.NSView

ToNative() public static method

Gets the native NSWindow from a Window
public static ToNative ( this window ) : NSWindow
window this Eto window object to get the native window handle from.
return MonoMac.AppKit.NSWindow