我正在使用MediaElement
.
我在MediaElement
a MediaElement.Clip
->下添加了EllipseGeometry
仅显示部分视频。
我想做4个按钮,每个按钮都会改变椭圆几何的中心位置。
当前代码是这样的:
<Grid>
<Canvas Height="279" HorizontalAlignment="Left" Margin="26,20,0,0" Name="canvas1" VerticalAlignment="Top" Width="453">
<Button Canvas.Left="22" Canvas.Top="200" Height="30" Width="30" HorizontalAlignment="Center" VerticalAlignment="Center" Panel.ZIndex="1">
<Button.Template>
<ControlTemplate TargetType="Button">
<StackPanel>
<ContentPresenter Content="{TemplateBinding Content}" />
</StackPanel>
</ControlTemplate>
</Button.Template>
<Image Source="Images\play.png"/>
</Button>
<MediaElement Canvas.Left="22" Canvas.Top="80" Height="193" Name="mediaElement1" Width="244" Panel.ZIndex="0" Source="C:\Users\ilans\Documents\Visual Studio 2010\Projects\Wildlife.wmv">
<MediaElement.Clip>
<EllipseGeometry Center="50,80" RadiusX="20" RadiusY="20" />
</MediaElement.Clip>
</MediaElement>
<Button Canvas.Left="356" Canvas.Top="40" Content="Button" Height="23" Name="button1" Width="75" Click="button1_Click" />
</Canvas>
</Grid>
如何添加操纵MediaElement.Clip
和EllipseGeometry
位置的新按钮?