IHYCrossPlatformSilverlightHost
Overview
The IHYCrossPlatfromSilverlightHost interface is used to identify host that is able to communicate with the Silverlight plugins. You will use this interface in your .NET host applications to react on the plugin calls. For more information about Silverlight hosting, please refer to this article.
Use Case
Your host object must implement this interface if you need a way to communicate with your plugin. For example:
public partial class Main : Form, IHYCrossPlatformHost, IHYCrossPlatformSilverlightHost
{
[..]
public void GetAutomationObject(string ProgId, GetAutomationObjectFlag Flags, ref object Dispatch)
{
if (ProgId == "Hydra.Host")
{
Dispatch = this;
}
}
public void NotifyError(string Error, string Source, int Line, int Column)
{
MessageBox.Show(Error);
}
}
Location
- Reference: RemObjects.Hydra.dll
- Namespace: RemObjects.Hydra.CrossPlatform
- Ancestry: IHYCrossPlatformInterface | IHYCrossPlatformHost | IHYCrossPlatformSilverlightHost
Required Methods
GetAutomationObject
GetAutomationObject method allows you to react on the AutomationFactory.CreateObject
and AutomationFactory.GetObject
calls (Flags parameter will be set accordingly). Your host can return an object that implements requested ProgId
.
method GetAutomationObject(id: String; flags: GetAutomationObjectFlag; var dispatcher: Object)
void GetAutomationObject(String id, GetAutomationObjectFlag flags, ref Object dispatcher)
Sub GetAutomationObject(id As String, flags As GetAutomationObjectFlag, ByRef dispatcher As Object)
Parameters:
- id:
- flags: Flags that indicates type of the requested operation.
- dispatcher:
NotifyError
This method is invoked by the plugin to notify about error within XAML DOM of the hosted control.
method NotifyError(error: String; source: String; line: Int32; column: Int32)
void NotifyError(String error, String source, Int32 line, Int32 column)
Sub NotifyError(error As String, source As String, line As Int32, column As Int32)
Parameters:
- error: Error message.
- source: File source.
- line: Line of the error.
- column: Column of the error.