8,757
社区成员
发帖
与我相关
我的任务
分享 <Grid Name="grid">
<MediaElement Name="MediaPlayer" HorizontalAlignment="Left" Margin="0,0,0,0" VerticalAlignment="Top" Width="Auto" Height="Auto"
LoadedBehavior="Manual" />
</Grid> MediaElement tempMedia;
for (int i = grid.Children.Count-1; i >=0; i--)
{
tempMedia = grid.Children[i] as MediaElement ;
if (tempMedia!=null)
{
grid.Children.Remove(tempMedia);
}
}