The information in this topic applies only to System Center 2012 SP1.
Table of Contents
- To create a new action add-in
- Example
- Compiling the Code
- Namespaces
-
Create a new class that inherits from Microsoft.SystemCenter.VirtualMachineManager.UIAddIns.ViewAddInBase.
-
Declare the System.Addin.AddinAttribute attribute on the class and give it a unique name.
-
Mark the scope of the class as public.
-
Override the CreateViewControl method to supply the console with a view.
-
Optionally override the GetButtonLabelString method to supply an alternative caption for the ribbon button.
-
Optionally override the SetScopeType method when you want to know if the console scope changes.
How to Design a View The information in this topic applies only to System Center 2012 SP1.
A view add-in is declared in a class that inherits from Microsoft.SystemCenter.VirtualMachineManager.UIAddIns.ViewAddInBase. This add-in provides a control to be displayed in the Virtual Machine Manager (VMM) console. This topic demonstrates the steps that are required to create a view add-in, and provides an example that you can reuse in your own code.
To create a new action add-in
Example
The following code example provides a skeleton that can be used when you are creating a new add-in. You will want to change the type of control returned to your own view:
[AddIn("View Add-in 1")] public class MyViewAddIn : ViewAddInBase { private Control _viewControl; public override FrameworkElement CreateViewControl() { _viewControl = new Control(); return _viewControl; } }
Compiling the Code
See Also