本文整理汇总了C#中Video.BeginAnimation方法的典型用法代码示例。如果您正苦于以下问题:C# Video.BeginAnimation方法的具体用法?C# Video.BeginAnimation怎么用?C# Video.BeginAnimation使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Video
的用法示例。
在下文中一共展示了Video.BeginAnimation方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: dropVideoOnCanvas
public void dropVideoOnCanvas(string filename, Point pos, int count)
{
FileType type = GetFileType(filename);
if (type == FileType.Video)
{
Dispatcher.adopt(() =>
{
var placeHolderMe = new MediaElement
{
Source = new Uri(filename, UriKind.Relative),
Width = 200,
Height = 200,
LoadedBehavior = MediaState.Manual
};
var placeHolder = new Video { MediaElement = placeHolderMe, VideoSource = placeHolderMe.Source };
InkCanvas.SetLeft(placeHolder, pos.X);
InkCanvas.SetTop(placeHolder, pos.Y);
var animationPulse = new DoubleAnimation
{
From = .3,
To = 1,
Duration = new Duration(TimeSpan.FromSeconds(1)),
AutoReverse = true,
RepeatBehavior = RepeatBehavior.Forever
};
placeHolder.BeginAnimation(OpacityProperty, animationPulse);
placeHolder.tag(new MeTLLib.DataTypes.ImageTag
{
author = Globals.me,
id = generateId(),
privacy = privacy,
zIndex = -1
});
MeTLLib.ClientFactory.Connection().UploadAndSendVideo(new MeTLStanzas.LocalVideoInformation
(currentSlide, Globals.me, target, privacy, placeHolder, filename, false));
Children.Remove(placeHolder);
});
}
}