AGI Ui Plugins 11 Send comments on this topic.
CreateNetToolWindow Method (IAgUiPluginWindowSite)
See Also  Example
Plugin
The plugin that creates the window.
AsmPath
A path to the assembly containing the type of the user control that will be hosted in a custom window.
ControlClass
A name of the user control type.
Caption
A text displayed as custom window title.





Description

Creates a custom tool window that hosts the .NET user control loaded from the assembly specified by the assemblyPath.

Syntax

[Visual Basic .NET]
Public Function CreateNetToolWindow( _
   ByVal Plugin As IAgUiPlugin, _
   ByVal AsmPath As String, _
   ByVal ControlClass As String, _
   ByVal Caption As String _
) As IAgUiWindow

[C#]
public IAgUiWindow CreateNetToolWindow(
IAgUiPlugin Plugin,
string AsmPath,
string ControlClass,
string Caption
);

[Managed C++]
public: IAgUiWindow^ CreateNetToolWindow(
IAgUiPlugin ^ Plugin,
String __gc ^ AsmPath,
String __gc ^ ControlClass,
String __gc ^ Caption
);

[Java]
public IAgUiWindow createNetToolWindow(
IAgUiPlugin Plugin,
String AsmPath,
String ControlClass,
String Caption
);

[Unmanaged C++]
public: HRESULT CreateNetToolWindow(
IAgUiPlugin * Plugin,
BSTR AsmPath,
BSTR ControlClass,
BSTR Caption,
IAgUiWindow ** ReturnValue
);

Parameters

Plugin
The plugin that creates the window.
AsmPath
A path to the assembly containing the type of the user control that will be hosted in a custom window.
ControlClass
A name of the user control type.
Caption
A text displayed as custom window title.

Return Type

A new instance of IAgUiWindow. The IAgUiWindow interface provides methods and properties to manipulate the position and attributes of a custom window.

Remarks

CreateNetToolWindow method creates a custom window that hosts an instance of the System.Windows.UserControl type. The method allows User Interface plugins written in .NET to host their custom user interfaces using the custom windows provided by the hosting environment.

Example

Create a custom window using the embedded .NET UserControl Copy Code
// IAgUiPluginSite site; 
 
// CustomUserInterface derives from UserControl 
 
IAgUiPluginWindowSite windowSite = site as IAgUiPluginWindowSite; 
windowSite.CreateNetToolWindow(thisthis.GetType().Assembly.Location, typeof(CustomUserInterface).FullName, "Simple User Control");

See Also

© 2016 Analytical Graphics, Inc. All Rights Reserved.

STK Programming Interface 11.0.1