If yes, is-it possible to have an example or a way to do that ?
Thanks.
If yes, is-it possible to have an example or a way to do that ?
Thanks.
It is only possible to drag cameras out and drop them in a view and when doing so the result is always a built-in camera-view-item. With this I think the answer to your question is no.
And… could-it be possible if I supply the built-in camera-view-item (corresponding to my custom camera-view-item) before starting to drag?
What you can achieve is only the equivalent to picking a camera in the camera folders in the left hand side and drag it to the view.
Ok, thanks.
Have you got an example or way to start dragging ?
with
DragDrop.DoDragDrop(<source>, <data>, <effects>)
I have found a way to do that.
Here is a quick snippet code to adapt to your needs…
using VideoOS.RemoteClient.Application.DragDrop;
private DraggedDeviceIdList m_draggedDeviceIdList = new DraggedDeviceIdList();
private void DataGrid_OnMouseMove(object p_sender, System.Windows.Input.MouseEventArgs p_e)
{
if (p_e.LeftButton == MouseButtonState.Pressed)
{
if (m_draggedDeviceIdList.Count == 0)
{
FQID fqid = GetYourCameraFQID("your-camera-name");
if (fqid != null)
{
Item draggedItem = Configuration.Instance.GetItem(fqid);
if ((draggedItem != null) && (draggedItem.FQID.Kind == Kind.Camera))
{
m_draggedDeviceIdList.Add(draggedItem.FQID.ObjectId);
}
}
}
if ((m_draggedDeviceIdList.Count > 0) && (p_e.LeftButton == MouseButtonState.Pressed))
{
DragDrop.DoDragDrop(this, m_draggedDeviceIdList, DragDropEffects.Copy);
}
}
else if (p_e.LeftButton == MouseButtonState.Released)
{
m_draggedDeviceIdList.Clear();
}
}