VisualizerDevelopmentHost.ShowVisualizer Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
ShowVisualizer() |
Calls the visualizer development host to show the visualizer, without parameters. |
ShowVisualizer(Control) |
Calls the visualizer development host to show the visualizer, passing a control that you want the visualizer parented to. |
ShowVisualizer(IWin32Window) |
Calls the visualizer development host to show the visualizer, passing a window that you want the visualizer parented to. |
Remarks
Calls the visualizer development host to show the visualizer. There are three overrides. One override has no parameters. The other overrides take a control or a window that you want the visualizer parented to when it is displayed.
ShowVisualizer()
Calls the visualizer development host to show the visualizer, without parameters.
public:
void ShowVisualizer();
public:
void ShowVisualizer();
void ShowVisualizer();
public void ShowVisualizer ();
member this.ShowVisualizer : unit -> unit
Public Sub ShowVisualizer ()
Examples
public static void TestShowVisualizer(object MyDataObject)
{
// This statement creates the host:
VisualizerDevelopmentHost visualizerHost = new VisualizerDevelopmentHost (MyDataObject, typeof(MyVisualizer));
// This statement calls the host to show the visualizer:
visualizerHost.ShowVisualizer();
}
public static void TestShowVisualizer(object MyDataObject)
{
// This statement creates the host:
VisualizerDevelopmentHost visualizerHost = new VisualizerDevelopmentHost(MyDataObject, typeof(MyVisualizer));
// This statement calls the host to show the visualizer:
visualizerHost.ShowVisualizer();
}
Remarks
Calls the visualizer development host to show the visualizer, without parameters.
Applies to
ShowVisualizer(Control)
Calls the visualizer development host to show the visualizer, passing a control that you want the visualizer parented to.
public:
void ShowVisualizer(System::Windows::Forms::Control ^ parentControl);
public void ShowVisualizer (System.Windows.Forms.Control parentControl);
member this.ShowVisualizer : System.Windows.Forms.Control -> unit
Public Sub ShowVisualizer (parentControl As Control)
Parameters
- parentControl
- Control
A control that you want the visualizer parented to.
Examples
// Create a new Control
Control myControl = new Control();
// ...
// Create the visualizer host
VisualizerDevelopmentHost visualizerHost = new VisualizerDevelopmentHost(objectToVisualize, typeof(SecondVisualizer));
// Call the visualizer host to show the visualizer
visualizerHost.ShowVisualizer(myControl);
// Create a new Control
Control myControl = new Control();
...
// Create the visualizer host
VisualizerDevelopmentHost visualizerHost = new VisualizerDevelopmentHost(objectToVisualize, typeof(SecondVisualizer));
// Call the visualizer host to show the visualizer
visualizerHost.ShowVisualizer(myControl);
Remarks
Calls the visualizer development host to show the visualizer, passing a control that you want the visualizer parented to.
Applies to
ShowVisualizer(IWin32Window)
Calls the visualizer development host to show the visualizer, passing a window that you want the visualizer parented to.
public:
void ShowVisualizer(System::Windows::Forms::IWin32Window ^ parentWindow);
public void ShowVisualizer (System.Windows.Forms.IWin32Window parentWindow);
member this.ShowVisualizer : System.Windows.Forms.IWin32Window -> unit
Public Sub ShowVisualizer (parentWindow As IWin32Window)
Parameters
- parentWindow
- IWin32Window
A window that you want the visualizer parented to.
Examples
// Create a class that implements IWin32Window
public class fooWindow : IWin32Window
{
#region IWin32Window Members
public IntPtr Handle
{
get { throw new Exception("The method or operation is not implemented."); }
}
#endregion
}
public static void TestShowVisualizer(object objectToVisualize)
{
// Create an object of class fooWindow
fooWindow myWindow = new fooWindow();
// Create the visualizer host
VisualizerDevelopmentHost visualizerHost = new VisualizerDevelopmentHost(objectToVisualize, typeof(SecondVisualizer));
// Call the visualizer host to show the visualizer
visualizerHost.ShowVisualizer(myWindow);
}
// Create a class that implements IWin32Window
public class fooWindow : IWin32Window
{
#region IWin32Window Members
public IntPtr Handle
{
get { throw new Exception("The method or operation is not implemented."); }
}
#endregion
}
public static void TestShowVisualizer(object objectToVisualize)
{
// Create an object of class fooWindow
fooWindow myWindow = new fooWindow();
// Create the visualizer host
VisualizerDevelopmentHost visualizerHost = new VisualizerDevelopmentHost(objectToVisualize, typeof(SecondVisualizer));
// Call the visualizer host to show the visualizer
visualizerHost.ShowVisualizer(myWindow);
}
Remarks
Calls the visualizer development host to show the visualizer, passing a window that you want the visualizer parented to.