/// <summary>
        /// Initializes a new instance of the <see cref="Paint.PlaybackProgressBarDefinition"/> class.
        /// </summary>
        /// <param name='progressBarDefinition'>Layout of the progress bar as defined within a xml file.</param>
        /// <param name='scale' iPad size scale - i.e.2 for retina and 1 for normal - allows us to multiply up the layout />
        public PlaybackProgressBarDefinition(ToolboxLayoutDefinitionPlaybackToolsProgressBar progressBarDefinition, int scale)
        {
            this.Bounds = new Rectangle(
                (int)progressBarDefinition.Region.Location.X * scale,
                (int)progressBarDefinition.Region.Location.Y * scale,
                progressBarDefinition.Region.Size.Width * scale,
                progressBarDefinition.Region.Size.Height * scale);

            this.BackgroundColor = new Color(
                progressBarDefinition.Region.BackgroundColor.Red,
                progressBarDefinition.Region.BackgroundColor.Green,
                progressBarDefinition.Region.BackgroundColor.Blue);

            this.ProgresIndicatorWidth = progressBarDefinition.IndicatorBar.Width * scale;
            this.ProgressIndicatorHeight = progressBarDefinition.IndicatorBar.Height * scale;

            this.ProgressIndicatorColor = new Color(
                progressBarDefinition.IndicatorBar.Color.Red,
                progressBarDefinition.IndicatorBar.Color.Green,
                progressBarDefinition.IndicatorBar.Color.Blue);
        }
 /// <summary>
 /// Creates the progress bar.
 /// </summary>
 /// <returns>The progress bar.</returns>
 /// <param name='progressBar'>Progress bar layout definition</param>
 private PlaybackProgressBar CreateProgressBar(ToolboxLayoutDefinitionPlaybackToolsProgressBar progressBar)
 {
     return new PlaybackProgressBar(this.GraphicsDisplay, new PlaybackProgressBarDefinition(progressBar, this.Scale));
 }