C# Class Moonlight.Gtk.MoonlightHost

A Gtk# widget that can be used to embed Moonlight/Silverlight(tm) content in a Gtk application
See the namespace documentation for a sample on how to use this widget with your Gtk# code.
Inheritance: EventBox
Mostrar archivo Open project: shana/moon Class Usage Examples

Public Methods

Method Description
CreateElementFromString ( string xaml, bool createNamescope ) : DependencyObject

Loads XAML within the context of the current GtkSilver widget

LoadXaml ( string xaml ) : void

Initializes the Surface widget from the XAML contents in a string

This uses the XAML parser to load the given string and display it on the Surface widget.

LoadXamlFromFile ( string file ) : void

Initializes the GtkSilver widget from the XAML contents in a file

This uses the XAML parser to load the given file and display it on the Surface widget.

LoadXap ( string xapPath ) : void

Initializes the Surface widget from a XAP file

This uses the XAP loader to load the given XAP display it on the Surface widget.

MoonlightHost ( ) : System

Public constructor

The size of the internal root canvas is determined by the size of the Surface widget, which can later be changed by using the standard Gtk# APIs (SizeAllocate).

The widget is initially empty, you must set the Content method with a System.Windows.FrameworkElement instance (you can create those programatically, or use LoadXaml(System.String), LoadXamlFromFile(System.String), or LoadXap(System.String)).

Private Methods

Method Description
OnSizeAllocated ( object o, Gtk.SizeAllocatedArgs args ) : void

Method Details

CreateElementFromString() public method

Loads XAML within the context of the current GtkSilver widget
public CreateElementFromString ( string xaml, bool createNamescope ) : DependencyObject
xaml string The contents of the string.
createNamescope bool
return System.Windows.DependencyObject

LoadXaml() public method

Initializes the Surface widget from the XAML contents in a string
This uses the XAML parser to load the given string and display it on the Surface widget.
public LoadXaml ( string xaml ) : void
xaml string The contents of the string.
return void

LoadXamlFromFile() public method

Initializes the GtkSilver widget from the XAML contents in a file
This uses the XAML parser to load the given file and display it on the Surface widget.
public LoadXamlFromFile ( string file ) : void
file string The name of a file in your file system.
return void

LoadXap() public method

Initializes the Surface widget from a XAP file
This uses the XAP loader to load the given XAP display it on the Surface widget.
public LoadXap ( string xapPath ) : void
xapPath string Path to the XAP file
return void

MoonlightHost() public method

Public constructor

The size of the internal root canvas is determined by the size of the Surface widget, which can later be changed by using the standard Gtk# APIs (SizeAllocate).

The widget is initially empty, you must set the Content method with a System.Windows.FrameworkElement instance (you can create those programatically, or use LoadXaml(System.String), LoadXamlFromFile(System.String), or LoadXap(System.String)).

public MoonlightHost ( ) : System
return System