I am creating multiple text boxes based of the active elements overlay example like this
var textBlock3 = new TextBlock()
{
Text = text,
IsHitTestVisible = false // this will ensure that the text will not capture any mouse events
};
Canvas.SetLeft(textBlock3, initialX + (2 * offsetX));
Canvas.SetTop(textBlock3, initialY + (2 * offsetY));
i have about 20-30 of these boxes to make, when i call them into the method I have to list them all like this
imageViewerAddOn.ActiveElementsOverlayAdd(new List<FrameworkElement> { textBlock, textBlock2, textBlock3 }, new ActiveElementsOverlayRenderParameters() { FollowDigitalZoom = false, ShowAlways = true, ZOrder = 1 });
was wondeirng if there is an easier way to do this that is less messy.
For context, I am trying to overlay the screen with the current logged in users username and it has been requesed that it is repeated across the screen evenly spaced.