2016-04-14 80 views
0

我正在以下,當我在XAML類型<StoryBoard>:在Windows應用程序項目,不支持的WinRT XAML故事板是缺少

故事板。

我開始這個項目如下:

新建項目>模板>的Visual C#> Windows>系統的Windows 8>窗口> 空白應用程序(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,當我a無論如何dded標籤IDE顯示線下面的標籤表明該標籤不支持。

我需要添加外部參考嗎?

+0

這真的沒有告訴我們很多。當你在XAML中鍵入什麼?你有辦法重現嗎? –

+0

in MainPage.xaml 我試圖把標籤放到動畫中,當我將鼠標懸停在標籤上時,我得到了上面提到的消息。 – iamsharp

+0

你如何將Storyboard放入網格?顯示你的xaml。 –

回答

0

故事板不能成爲UIElemenent集合的子:

<Grid.Resources> 
     <Storyboard x:Key="BestStoryboardEver"></Storyboard> 
    </Grid.Resources> 

我建議使用混合了Visual Studio創建故事板。您還可以將故事板添加到<Page.Resources。 我希望這有助於。

+0

謝謝。我需要它在WinRT xaml的漢堡菜單,但我最終使用自動寬度的網格並添加和清除子節點。 – iamsharp