Tag: viewbox

在ResourceDictionary文件中使用viewbox

我有ResourceFile1.xaml文件的内容 …. PhoneAppplicationPage的代码 但这个代码不起作用。 Designer Error:InvalidOperationException:Element已经是另一个元素的子元素。 还有如果我使用类似的代码运行时错误:无法分配给属性’System.Windows.Controls.ContentControl.Content’。 如果Viewbox在Grid.Resources中使用没有问题可以正常工作但我想使用ResourceDictionary.how我可以吗?

System.Windows.Media.Animation警告:6

当我使用故事板在wpf中运行动画时,我在输出窗口中出现以下错误。 System.Windows.Media.Animation警告:6:无法执行操作,因为指定的Storyboard从未应用于此对象以进行交互式控制。 行动=“停止”; 故事板= ‘System.Windows.Media.Animation.Storyboard’; Storyboard.HashCode = ‘57850459’; Storyboard.Type = ‘System.Windows.Media.Animation.Storyboard’; TargetElement = ‘System.Windows.Media.Animation.Storyboard’; TargetElement.HashCode = ‘57850459’; TargetElement.Type = ‘System.Windows.Media.Animation.Storyboard’ 谁能告诉我它将如何影响我的程序以及如何删除它? 我没有在.xaml文件中定义storyboard。 但是当设计文件(.xaml)背后的代码我在类中创建了私有stoaryboard时,我使用代码中的以下语法将其分配给framework元素。 this.storyboard1.Begin(this.viewbox1, true); storyboard1是我在类中创建的对象,viewbox1是我要应用此动画的元素。 有谁能够帮我? 提前致谢。