我的目标是在MediaElement上有一个边距或类似的东西,以便在它下面显示一个按钮,我的目标是在MediaElement上有一个边距或类似的东西,这样就可以在它下面显示一个按钮,裁剪视频。我怎么做到这一点?
XML代码
<MediaElement x:Name="VideoPlayer"
Height="370"
VerticalAlignment="Top" Width="650"
Cursor="Hand"
Stretch="Uniform"
AllowDrop="True" Drop="VideoPlayer_Drop">
<Button Content="Play" Height="21" Width="50" VerticalAlignment="Bottom"
Margin="270,0,290,10"/>
调整代码大小
private void Window_SizeChanged(object sender, SizeChangedEventArgs e)
{
VideoPlayer.Height = MainContainer.Height;
VideoPlayer.Width = MainContainer.Width;
VideoPlayer.Margin = new Thickness(0, 0, 0, 32);
}