Note that there are some explanatory texts on larger screens.

plurals
  1. POCalling Storyboard inside DataTemplate
    text
    copied!<p>I am getting a constant error with my code that I can;t figure out.</p> <blockquote> <p>No applicable name scope exists to resolve the name 'gridCallLog'.</p> </blockquote> <pre><code>&lt;DataTemplate x:Key="ContentDetail"&gt; &lt;DataTemplate.Resources&gt; &lt;Storyboard x:Key="StoryCallLogOn"&gt; &lt;ThicknessAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Margin)" Storyboard.TargetName="gridCallLog"&gt; &lt;EasingThicknessKeyFrame KeyTime="0" Value="0,0,10,23.04"/&gt; &lt;EasingThicknessKeyFrame KeyTime="0:0:0.6" Value="0,0,10,200"/&gt; &lt;/ThicknessAnimationUsingKeyFrames&gt; &lt;ThicknessAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Margin)" Storyboard.TargetName="borderCallLog"&gt; &lt;EasingThicknessKeyFrame KeyTime="0" Value="0,402,10,23.04"/&gt; &lt;EasingThicknessKeyFrame KeyTime="0:0:0.6" Value="0,225,10,23.04"/&gt; &lt;/ThicknessAnimationUsingKeyFrames&gt; &lt;/Storyboard&gt; &lt;/DataTemplate.Resources&gt; &lt;StackPanel Orientation="Horizontal" Height="500" &gt; &lt;Border Margin="10,5,0,10" BorderBrush="Transparent" CornerRadius="3" BorderThickness="1" Width="1050"&gt; &lt;StackPanel Margin="5,5,9,5" Orientation="Horizontal"&gt; &lt;dx:DXTabControl Width="850" Margin="5,5,0,0"&gt; &lt;dx:DXTabItem Header="Call Log"&gt; &lt;StackPanel&gt; &lt;dxg:GridControl x:Name="gridCallLog" Height="400" ItemsSource="{Binding ElementName=MainStack,Path=DataContext.CallLog}" dx:ThemeManager.ThemeName="Office2010Blue" Margin="0,0,10,0" SelectedItem="{Binding ElementName=MainStack,Path=DataContext.SelectedCallLog,UpdateSourceTrigger=PropertyChanged}" &gt; &lt;dxg:GridControl.Columns &gt; &lt;i:Interaction.Triggers&gt; &lt;i:EventTrigger EventName="MouseLeftButtonDown"&gt; &lt;command:EventToCommand Command="{Binding ElementName=MainStack,Path=DataContext.CallLogOnCommand}" /&gt; &lt;/i:EventTrigger&gt; &lt;ei:DataTrigger Binding="{Binding ElementName=MainStack,Path=DataContext.CallLogOn, Mode=OneWay}" Value="ON"&gt; &lt;ei:ControlStoryboardAction Storyboard="{StaticResource StoryCallLogOn}" ControlStoryboardOption="Play"/&gt; &lt;/ei:DataTrigger&gt; </code></pre> <p></p> <p>The storyboard is getting called with no problem. But for some reason even though the storyboard is in the DataTemplate.Resources it cannot see my GridControl named gridCallLog. Any pointers would be gratefully accepted. Scott</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload