I'm having some trouble using ILNumerics in LinqPad. I have the following code in LinqPad:
void Main()
{
var scene = new ILScene {
new ILPlotCube(twoDMode: false) {
new ILSurface(ILSpecialData.sincf(40, 60, 2.5f)) {
Wireframe = { Color = Color.FromArgb(50, Color.LightGray) },
Colormap = Colormaps.Jet
}
}
};
scene.First<ILPlotCube>().Rotation = Matrix4.Rotation(new Vector3(1f, 0.23f, 1f), 0.7f);
scene.Camera.Add(new ILSphere());
var panel = new ILPanel { Scene = scene };
PanelManager.DisplayControl(panel);
}
This code results in a big blue circle (with the text "ILNumerics ILPanel (OpenGL)" in the center) in the "custom" linqpad tab. The "Results" tab in linqpad contains the following text:
Determining Design Mode...
Entry Assembly: (null)
CurrentTypeAssembly: ILNumerics32, Version=3.1.0.0, Culture=neutral, PublicKeyToken=null
Loaded Assemblies:
Design Mode: True
Questions:
- Is possible render this as a WPF element instead of a WinForms control? (I guess this will render the plot successfully)
- Alternatively; is it possible to "trick" the ILPanel to think it isn't being rendered in design mode?