WinRT XAML 故事板丢失
WinRT XAML StoryBoard is missing
当我在 XAML 中键入 <StoryBoard>
时,我得到以下信息:
StoryBoard not supported in a Windows App Project.
我是这样开始项目的:
New Project > Templates > Visual C# > Windows > Windows 8 > Windows >
Blank App (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 显示标签下方的一行,表明该标签不受支持。
我需要添加外部引用吗?
故事板不能是 UIElement 集合的子项:
<Grid.Resources>
<Storyboard x:Key="BestStoryboardEver"></Storyboard>
</Grid.Resources>
我建议使用 visual Studio 的 blend 来创建故事板。您还可以将故事板添加到 <Page.Resources
。
希望对您有所帮助。
当我在 XAML 中键入 <StoryBoard>
时,我得到以下信息:
StoryBoard not supported in a Windows App Project.
我是这样开始项目的:
New Project > Templates > Visual C# > Windows > Windows 8 > Windows > Blank App (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 显示标签下方的一行,表明该标签不受支持。
我需要添加外部引用吗?
故事板不能是 UIElement 集合的子项:
<Grid.Resources>
<Storyboard x:Key="BestStoryboardEver"></Storyboard>
</Grid.Resources>
我建议使用 visual Studio 的 blend 来创建故事板。您还可以将故事板添加到 <Page.Resources
。
希望对您有所帮助。