Всем привет. У меня есть список, с привязкой к данным. В этом списке есть элемент, который требуется анимировать. Допустим гиппотечиская страничка может выглядеть так: Код | <Page x:Class="MyProject.MyPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="using:MyProject" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:i="using:Microsoft.Xaml.Interactivity" xmlns:core="using:Microsoft.Xaml.Interactions.Core" xmlns:media="using:Microsoft.Xaml.Interactions.Media" mc:Ignorable="d" Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> <Page.Resources> <Storyboard x:Name="Show_Control"> <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Control" Storyboard.TargetProperty="Visibility"> <DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/> </ObjectAnimationUsingKeyFrames> </Storyboard> </Page.Resources> <Grid> <ListBox ItemsSource="{Binding test}"> <ListBox.ItemTemplate> <DataTemplate> <Grid Background="White"> <i:Interaction.Behaviors> <core:EventTriggerBehavior EventName="Tapped"> <media:ControlStoryboardAction Storyboard="{StaticResource Show_Control}"/> </core:EventTriggerBehavior> </i:Interaction.Behaviors> <TextBlock Text="Hello!"/> <StackPanel x:Name="Control" Height="30" Background="#000" Visibility="Collapsed"/> </Grid> </DataTemplate> </ListBox.ItemTemplate> </ListBox> </Grid> </Page>
|
В данном примере по Тапу на элементе списка должен появляться скрытый черный квадратик StackPanel. Однако на практике приложение падает с ошибкой Цитата | System.Exception: No installed components were detected. Cannot resolve TargetName Control.
at Windows.UI.Xaml.Media.Animation.Sto ryboard.Begin() at Microsoft.Xaml.Interactions.Media.C ontrolStoryboardAction.Execute(Obje ct sender, Object parameter) at Microsoft.Xaml.Interactivity.Intera ction.ExecuteActions(Object sender, ActionCollection actions, Object parameter) at Microsoft.Xaml.Interactions.Core.Ev entTriggerBehavior.OnEvent(Object sender, Object eventArgs)
|
Куда копать?
|