Saturday, 8 June 2013

" 'wrapPanelListItem' name cannot be found in the name scope" WPF StoryBord Exception

" 'wrapPanelListItem' name cannot be found in the name scope" WPF StoryBord Exception

Storybord animation has added to a WrapPanel which located in side a ListBox, and is give an exception
"'wrapPanelListItem' name cannot be found in the name scope"
code for storyBord
  <Storyboard x:Key="wrapSlidLeft" AutoReverse="True">
        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).    (TransformGroup.Children)[3].(TranslateTransform.X)" Storyboard.TargetName="wrapPanelListItem">
            <EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="29">
                <EasingDoubleKeyFrame.EasingFunction>
                    <ExponentialEase EasingMode="EaseOut"/>
                </EasingDoubleKeyFrame.EasingFunction>
            </EasingDoubleKeyFrame>
        </DoubleAnimationUsingKeyFrames>
    </Storyboard> 
code for ListBox which have a wrapPanel
<ListBox x:Name="listBoxRecentProjects" BorderThickness="0"  Margin="20,50,0,0"  ScrollViewer.CanContentScroll="False" ScrollViewer.VerticalScrollBarVisibility="Hidden" ScrollViewer.HorizontalScrollBarVisibility="Hidden" Height="530" Background="Transparent" Width="305">
                <ListBox.Effect>
                    <DropShadowEffect Direction="330" BlurRadius="24" ShadowDepth="13" />
                </ListBox.Effect>
                <ListBox.ItemTemplate>
                    <DataTemplate>
                        <WrapPanel  x:Name="wrapPanelListItem" Background="#FFA70032" MaxWidth="290" Margin="0,5,0,0" MouseEnter="wrapPanelListItem_MouseEnter">

                            <WrapPanel.RenderTransform>
                                <TransformGroup>
                                    <ScaleTransform/>
                                    <SkewTransform/>
                                    <RotateTransform/>
                                    <TranslateTransform/>
                                </TransformGroup>
                            </WrapPanel.RenderTransform>

                            <WrapPanel Orientation="Vertical" MaxWidth="290" Height="100">
                                    <Label Content="{Binding actv_name}" Height="80" Width="300" Foreground="White"   HorizontalAlignment="Left" FontSize="15" FontFamily="Nyala" />
                                    <Label Content="{Binding actv_phase}" Height="32" Width="300" Foreground="White"   HorizontalAlignment="Right" FontSize="10" FontFamily="Nyala" />
                                </WrapPanel>

                        </WrapPanel>
                    </DataTemplate>
                </ListBox.ItemTemplate>
            </ListBox>

No comments:

Post a Comment