Пример #1
0
 public void SetElapsedTimeControl(TimeControl elapsed)
 {
     this.elapsedTimeControl = elapsed;
     if (elapsed != null)
     {
         this.elapsedTimeControl.CurrentTime = TimeSpan.Zero;
         this.elapsedTimeControl.Duration    = TimeSpan.FromSeconds(1);
     }
 }
Пример #2
0
#pragma warning disable SA1202 // Elements should be ordered by access
        protected override void OnApplyTemplate()
#pragma warning restore SA1202 // Elements should be ordered by access
        {
            base.OnApplyTemplate();
            this.thumb                               = this.GetTemplateChild("positionIndicator") as FrameworkElement;
            this.trackCanvas                         = this.GetTemplateChild("trackCanvas") as FrameworkElement;
            this.myPercentageTimeControl             = this.GetTemplateChild("timeControl") as TimeControl;
            this.myPercentageTimeControl.CurrentTime = TimeSpan.Zero;
            this.myPercentageTimeControl.Duration    = TimeSpan.FromSeconds(1);
            this.trackCanvas.SizeChanged            += this.TrackCanvas_SizeChanged;

            InitializeComposition();
        }