public void SetVideoFrameState(int videoFrameTimestampInSeconds, EmotionScores emotion)
        {
            EmotionToColoredBar emotionResponse = new EmotionToColoredBar();

            emotionResponse.UpdateEmotion(emotion);
            emotionResponse.Tag   = videoFrameTimestampInSeconds;
            emotionResponse.Width = Math.Max(this.chart.ActualWidth / this.duration, 0.5);
            emotionResponse.HorizontalAlignment = HorizontalAlignment.Left;

            emotionResponse.Margin = new Thickness
            {
                Left = ((double)videoFrameTimestampInSeconds / this.duration) * this.chart.ActualWidth
            };

            this.chart.Children.Add(emotionResponse);
        }
        public void SetVideoFrameState(int videoFrameTimestampInSeconds, Emotion emotion, ImageAnalyzer analysisResult = null)
        {
            EmotionToColoredBar emotionResponse = new EmotionToColoredBar();

            emotionResponse.UpdateEmotion(emotion);
            emotionResponse.Tag   = videoFrameTimestampInSeconds;
            emotionResponse.Width = Math.Max(this.chart.ActualWidth / this.duration, 0.5);
            emotionResponse.HorizontalAlignment = HorizontalAlignment.Left;

            emotionResponse.Margin = new Thickness
            {
                Left = ((double)videoFrameTimestampInSeconds / this.duration) * this.chart.ActualWidth
            };

            this.chart.Children.Add(emotionResponse);

            if (analysisResult != null)
            {
                this.AddFlyoutToElement(emotionResponse, analysisResult);
            }
        }