How to overlay image on image in WPF?

I am trying to figure out how to overlay an image or text box on an image in WPF. The video stream from the Kinect sensor will be placed on the base image, and I want to overlay the image on it. For example, the video stream will contain a text field in the feed that will update the counter or tree image on top of the video stream.

Is there an easy way to achieve this in a layout? Is it just a matter of changing properties or adding canvas?

The following image better illustrates what I'm trying to do:

Controls over a live video feed

+4
source share
2 answers

Grid - , Back Front Canvas ,

:

<Grid>
    <VideoControl><!-- I've never tried video --></VideoControl>
    <TextBlock Text="My Text" />
</Grid>

<Grid.ColumnDefinitions> <Grid.RowDefinitions>, ,

+8

WPF , Grid. - , .

<Grid>
  <Image Source="image on lowest layer" />
  <Image Source="overlaying image" />
</Grid>
+2

Source: https://habr.com/ru/post/1526820/


All Articles