当我在XAML中输入<StoryBoard>
时,我得到以下内容:
Windows应用程序项目中不支持StoryBoard。
我开始了以下项目:
新项目&gt;模板&gt; Visual C#&gt; Windows&gt; Windows 8&gt; Windows&gt; 空白应用程序(Windows 8.1)
这是MainPage.xaml:
<Page
x:Class="TestApp.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:TestApp"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<Grid>
<StoryBoard></StoryBoard>
</Grid>
第一个intellisense没有显示StoryBoard,当我添加标签时,IDE显示标签下方的行,表示不支持该标签。
我是否需要添加外部参考?
答案 0 :(得分:0)
故事板不能是UIElemenent Collection的孩子:
<Grid.Resources>
<Storyboard x:Key="BestStoryboardEver"></Storyboard>
</Grid.Resources>
我建议使用blend for visual Studio来创建故事板。您还可以将故事板添加到<Page.Resources
。
我希望这会有所帮助。