I would like the red rectangle to be at the border of the view square (including the black borders). I tried Canvas.SetTop or using addon.Size but that does not work.
You cannot draw outside the image area; this is by design that overlay can be made on the image area only.
In general you cannot control the black space around the image area, it will depend on whether the user uses the “Maintain Image aspect ratio” or not, and when using this how the user makes the Smart Client have a size where it fits the image aspect ratio of the camera setup.
We need this because our client wants a smart wall where cameras are visually grouped together using colors. They also want the camera name to be displayed differently than the default “white on black” text.
What do you reckon would be the simplest? Implement our own video player so we control the whole display?
If the “Smart Wall” does not need advanced capabilities but just present live footage framed by a color border and with different colors on a header label then it is not a huge task.
I would use the ImageViewerWpfControl and start with the PlaybackWpfUser sample for inspiration.
If you want capabilities that resemples the Smart Client it is a huge task, then it might prove a lesser task to develop a ViewItem for the Smart Client allowing for a lot of freedom to introduce new UI elements that could live up to the requirements.
You could explore the Video Preview plugin sample, the Smart Client plugin part of it, on how to make your own ViewItem and incorporate ImageViewerControl (or ImageViewerWpfControl) for easy handling of camera footage.
But it calls SetOverlay() with a bitmap, probably that for bitmaps it “has to” display them entirely even if they are outside of the area of the camera.
That or this example talks to a different ImageViewerAddOn than the one in my example.