我在内容对话框中定义了一个故事板,如下所示
<ContentDialog.Resources>
<Storyboard x:Name="DialogAnimation" BeginTime="0:0:0">
<DoubleAnimation x:Name="ScaleXUpAnimation" Storyboard.TargetName="GridScaleTransform" Storyboard.TargetProperty="ScaleX" From="0.2" To="1" Duration="0:0:0.75">
<DoubleAnimation.EasingFunction>
<PowerEase EasingMode="EaseInOut"></PowerEase>
</DoubleAnimation.EasingFunction>
</DoubleAnimation>
<DoubleAnimation x:Name="ScaleYUpAnimation" Storyboard.TargetName="GridScaleTransform" Storyboard.TargetProperty="ScaleY" From="0.2" To="1" Duration="0:0:0.75">
<DoubleAnimation.EasingFunction>
<PowerEase EasingMode="EaseInOut"></PowerEase>
</DoubleAnimation.EasingFunction>
</DoubleAnimation>
</Storyboard>
</ContentDialog.Resources>
当我尝试在页面加载的事件
中调用开始()时 private MessageDialog()
{
this.InitializeComponent();
this.Loaded += MessageDialog_Loaded;
}
private void MessageDialog_Loaded(object sender, RoutedEventArgs e)
{
DialogAnimation.Begin();
}
当我在x86或x64平台上运行时,它工作正常,但在ARM平台上,当我到达 DialogAnimation.Begin()方法时,我遇到了这个错误
System.Runtime.InteropServices.COMException: 'No installed components were detected.