none
KinectTileButton visibility problems RRS feed

  • Question

  • Hi!

    I'm new to kinect dev and just know the basics of C#.

    And I'm having problems to change the visibility property of a KinectTileButton.

    This is the error that shows up:

    Cannot animate the 'Visibility' property on a 'Microsoft.Kinect.Toolkit.Controls.KinectTileButton' using a 'System.Windows.Media.Animation.ObjectAnimationUsingKeyFrames'

    This is my xaml:

    <Window.Resources>
            <Storyboard x:Key="Test">
                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Blue" Storyboard.TargetProperty="Visibility" Duration="0">
                    <DiscreteObjectKeyFrame KeyTime="0" Value="Hidden"/>
                </ObjectAnimationUsingKeyFrames>
            </Storyboard>
        </Window.Resources>

    [....]

    <k:KinectTileButton Grid.Row="0" Grid.Column="0" Name="Blue" Click="ButtonOnClick" Margin="170,42,10,10" Width="200" Height="200">

    [...]

    <k:KinectTileButton.Triggers>
                            <EventTrigger RoutedEvent="k:KinectTileButton.Click">
                                <BeginStoryboard Storyboard="{StaticResource Test}" x:Name="Test2"></BeginStoryboard>
                            </EventTrigger>
                        </k:KinectTileButton.Triggers>

    Does anyone knows or have already dealt with it?

    Thanks!

    Monday, August 25, 2014 10:41 PM

All replies

  • You should modify the original resource file for the control if you intend to modify the trigger events. I don't have much experience with WPF, but the KinectControls already have triggers and you might not be able to stack them with your own.

    Carmine Sirignano - MSFT

    Tuesday, August 26, 2014 4:37 PM