To achieve this you should make a workspace plugin containing just a 1x1 view layout and then implement a ViewItem plugin containing your user control and put this in the workspace view.
So can something like this be done? Specifically using ViewAndLayoutItem.InsertViewItem instead of InsertViewItemPlugin
using System;
using System.Collections.Generic;
using System.Drawing;
using VideoOS.Platform;
using VideoOS.Platform.Client;
using VideoOS.Platform.Messaging;
using Message = VideoOS.Platform.Messaging.Message;
using Timer = System.Windows.Forms.Timer;
namespace OurPlug.Admin
{
class OurPlugWorkSpacePlugin : WorkSpacePlugin
{
public static Guid SCWorkSpacePluginId = new Guid("5398caba-58cd-4603-af8f-423aaf0956f3");
internal static string MilestoneHostName = "localhost";
internal static ServerId serverId;
public override void Init(){
MilestoneHostName = serverId.ServerHostname;
LoadProperties(true);
ViewAndLayoutItem.InsertViewItem(0, new OurPlugItemManager(OurPlugDefinition.OurPlugKind, MilestoneHostName));
}
public override void Close(){}
public override Guid Id{get {return SCWorkSpacePluginId;}
}
public override string Name{get{return OurPlugDefinition.ProductName;}}
public override bool IsSetupStateSupported{get{return false;}}
}
}
InsertViewItem can only be used if you have a configuration string for a camera. It cannot take an Item Manager as an argument. Please implement your own view item and use InsertViewItemPlugin in the same way as the SCWorkspace sample does it. Also remember to define the layout of the ViewAndLayoutItem.
The ViewItemUserControl is just a standard WinForms user control so you can use standard control embedding. We are doing that a lot, so I cannot see why it should not work for you.