Ken burns/Crop on Video object

I’m trying to control what part of a video is shown by cropping the video.

I’ve tried to place a video object inside a Panel with ClipToBounds="true" and gave the panel a fixed width and height. I then tried to change the X and Y position of the video afterwards, but it doesn’t work like a crop or a ken burn. It just moves whatever is in the video. I’ve even tried an offset. None of these appear to work.

Hi Zia,

could you please post a complete, minimal reproduction to show the code you’ve tried? A visual explanation of what you want to achieve would help a lot too.


Please take a look at the attached images. Think of whatever is in the red box in the images as what portion of the video is visible on screen due to the StretchingMode of the video being set to UniformToFill inside a Panel with fixed width and height. I am trying to figure out a way to change what part of the video is visible to the red box in Image 2.

The code below gives you an idea of what my code looks like. So far I’ve tried adjusting the X and Y values of the video, however that has not worked. I have also tried using the Offset property on the Video, which has also not worked. With both of these, it continues to show the same portion of the video but just offsets the position of the video.

<Panel Height="100" Width="100" ClipToBounds="True">
            <Video File="myFile" StretchMode="UniformToFill" />


So then you’re after applying a mask on a Video. We do have something similar for Image nodes, it’s called Mask and it takes a PNG file as a parameter.

I’m not sure if that works with Video though, I don’t think it does. As far as I know, making a dynamic mask on Video that can be animated is not something that can be achieved easily at this point.