private void BuildTQSDrawable(int rowindex, object propvalue) { var drawingComponent = DrawableComponentCreator.CreateDrawableComponent(DrawableComponentTypes.TQSJan); WindowsFormsHost host = new WindowsFormsHost(); host.Height = 300; host.Child = drawingComponent; Grid.SetRow(host, rowindex++); Grid.SetColumnSpan(host, 2); g.Children.Add(host); DrawableBasic drawableBasic = propvalue as DrawableBasic; drawingComponent.IDrawable.Add(drawableBasic.GetDrawingElements().ToArray()); host.Loaded += (o, e) => { drawingComponent.ZoomExtents(); drawingComponent.ZoomOut(); }; }
public MainWindow() { InitializeComponent(); drawingComponent = DrawableComponentCreator.CreateDrawableComponent(DrawableComponentTypes.TQSJan); WFHost.Child = drawingComponent; }