Note that there are some explanatory texts on larger screens.

plurals
  1. POMultiple Images in a Grid using the Microsoft Kinect SDK SlideShow Example
    text
    copied!<p>I am trying to use the Microsoft Kinect SDK SlideShow example as the basis for a new project where I can display 8 images in a grid which can be animated using a Storyboard. However, when I run the application, none of the images display. I realize that all of the images will be the same right now given the binding for each image, but I can't get any of the images to display. All I get is a blank screen with the gridlines shown (for debugging). I can use gestures to flick through a panel from one set of 8 images to another, but none of the images display. </p> <p>Can you help me see what I am doing wrong?</p> <pre><code>&lt;Window x:Name="window" x:Class="Microsoft.Samples.Kinect.Slideshow.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Slide Show" Height="735" Width="800" &gt; &lt;Window.Resources&gt; &lt;SolidColorBrush x:Key="MediumGreyBrush" Color="#ff6e6e6e"/&gt; &lt;BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/&gt; &lt;Storyboard x:Key="LeftAnimate"&gt; &lt;DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="previous"&gt; &lt;EasingDoubleKeyFrame KeyTime="0" Value="1"/&gt; &lt;EasingDoubleKeyFrame KeyTime="0:0:0.4" Value="1"/&gt; &lt;EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="0"/&gt; &lt;/DoubleAnimationUsingKeyFrames&gt; &lt;DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="next"&gt; &lt;EasingDoubleKeyFrame KeyTime="0" Value="0"/&gt; &lt;/DoubleAnimationUsingKeyFrames&gt; &lt;ThicknessAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Margin)" Storyboard.TargetName="current"&gt; &lt;EasingThicknessKeyFrame KeyTime="0" Value="2000,0,-2000,0"/&gt; &lt;EasingThicknessKeyFrame KeyTime="0:0:0.5" Value="0"/&gt; &lt;/ThicknessAnimationUsingKeyFrames&gt; &lt;/Storyboard&gt; &lt;Storyboard x:Key="RightAnimate"&gt; &lt;DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="previous"&gt; &lt;EasingDoubleKeyFrame KeyTime="0" Value="0"/&gt; &lt;/DoubleAnimationUsingKeyFrames&gt; &lt;DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="next"&gt; &lt;EasingDoubleKeyFrame KeyTime="0" Value="1"/&gt; &lt;EasingDoubleKeyFrame KeyTime="0:0:0.4" Value="1"/&gt; &lt;EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="0"/&gt; &lt;/DoubleAnimationUsingKeyFrames&gt; &lt;ThicknessAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Margin)" Storyboard.TargetName="current"&gt; &lt;EasingThicknessKeyFrame KeyTime="0" Value="-2000,0,2000,0"/&gt; &lt;EasingThicknessKeyFrame KeyTime="0:0:0.5" Value="0"/&gt; &lt;/ThicknessAnimationUsingKeyFrames&gt; &lt;/Storyboard&gt; &lt;/Window.Resources&gt; &lt;Grid DataContext="{Binding ElementName=window}" Margin="10 0 10 0"&gt; &lt;Grid.RowDefinitions&gt; &lt;RowDefinition /&gt; &lt;/Grid.RowDefinitions&gt; &lt;Grid.ColumnDefinitions&gt; &lt;ColumnDefinition /&gt; &lt;/Grid.ColumnDefinitions&gt; &lt;Grid&gt; &lt;Grid x:Name="next" ShowGridLines="True"&gt; &lt;Grid.RowDefinitions&gt; &lt;RowDefinition /&gt; &lt;RowDefinition /&gt; &lt;/Grid.RowDefinitions&gt; &lt;Grid.ColumnDefinitions&gt; &lt;ColumnDefinition /&gt; &lt;ColumnDefinition /&gt; &lt;ColumnDefinition /&gt; &lt;ColumnDefinition /&gt; &lt;/Grid.ColumnDefinitions&gt; &lt;!-- Change the binding to the correct picture or video --&gt; &lt;Image Grid.Column="0" Grid.Row="0" Source="{Binding NextPicture}" Opacity="0"/&gt; &lt;Image Grid.Column="1" Grid.Row="0" Source="{Binding NextPicture}" Opacity="0"/&gt; &lt;Image Grid.Column="2" Grid.Row="0" Source="{Binding NextPicture}" Opacity="0"/&gt; &lt;Image Grid.Column="3" Grid.Row="0" Source="{Binding NextPicture}" Opacity="0"/&gt; &lt;Image Grid.Column="0" Grid.Row="1" Source="{Binding NextPicture}" Opacity="0"/&gt; &lt;Image Grid.Column="1" Grid.Row="1" Source="{Binding NextPicture}" Opacity="0"/&gt; &lt;Image Grid.Column="2" Grid.Row="1" Source="{Binding NextPicture}" Opacity="0"/&gt; &lt;Image Grid.Column="3" Grid.Row="1" Source="{Binding NextPicture}" Opacity="0"/&gt; </code></pre> <p></p> <pre><code> &lt;Grid x:Name="previous" ShowGridLines="True"&gt; &lt;Grid.RowDefinitions&gt; &lt;RowDefinition /&gt; &lt;RowDefinition /&gt; &lt;/Grid.RowDefinitions&gt; &lt;Grid.ColumnDefinitions&gt; &lt;ColumnDefinition /&gt; &lt;ColumnDefinition /&gt; &lt;ColumnDefinition /&gt; &lt;ColumnDefinition /&gt; &lt;/Grid.ColumnDefinitions&gt; &lt;!-- Change the binding to the correct picture or video --&gt; &lt;Image Grid.Column="0" Grid.Row="0" Source="{Binding PreviousPicture}" Opacity="0"/&gt; &lt;Image Grid.Column="1" Grid.Row="0" Source="{Binding PreviousPicture}" Opacity="0"/&gt; &lt;Image Grid.Column="2" Grid.Row="0" Source="{Binding PreviousPicture}" Opacity="0"/&gt; &lt;Image Grid.Column="3" Grid.Row="0" Source="{Binding PreviousPicture}" Opacity="0"/&gt; &lt;Image Grid.Column="0" Grid.Row="1" Source="{Binding PreviousPicture}" Opacity="0"/&gt; &lt;Image Grid.Column="1" Grid.Row="1" Source="{Binding PreviousPicture}" Opacity="0"/&gt; &lt;Image Grid.Column="2" Grid.Row="1" Source="{Binding PreviousPicture}" Opacity="0"/&gt; &lt;Image Grid.Column="3" Grid.Row="1" Source="{Binding PreviousPicture}" Opacity="0"/&gt; </code></pre> <p></p> <pre><code> &lt;Grid x:Name="current" ShowGridLines="True"&gt; &lt;Grid.RowDefinitions&gt; &lt;RowDefinition /&gt; &lt;RowDefinition /&gt; &lt;/Grid.RowDefinitions&gt; &lt;Grid.ColumnDefinitions&gt; &lt;ColumnDefinition /&gt; &lt;ColumnDefinition /&gt; &lt;ColumnDefinition /&gt; &lt;ColumnDefinition /&gt; &lt;/Grid.ColumnDefinitions&gt; &lt;!-- Change the binding to the correct picture or video --&gt; &lt;Image Grid.Column="0" Grid.Row="0" Source="{Binding Picture}" Opacity="0"/&gt; &lt;Image Grid.Column="1" Grid.Row="0" Source="{Binding Picture}" Opacity="0"/&gt; &lt;Image Grid.Column="2" Grid.Row="0" Source="{Binding Picture}" Opacity="0"/&gt; &lt;Image Grid.Column="3" Grid.Row="0" Source="{Binding Picture}" Opacity="0"/&gt; &lt;Image Grid.Column="0" Grid.Row="1" Source="{Binding Picture}" Opacity="0"/&gt; &lt;Image Grid.Column="1" Grid.Row="1" Source="{Binding Picture}" Opacity="0"/&gt; &lt;Image Grid.Column="2" Grid.Row="1" Source="{Binding Picture}" Opacity="0"/&gt; &lt;Image Grid.Column="3" Grid.Row="1" Source="{Binding Picture}" Opacity="0"/&gt; </code></pre> <p></p> <pre><code> &lt;/Grid&gt; &lt;/Grid&gt; </code></pre> <p></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