Inheritance: Windows.UI.Xaml.Controls.Control
 /// <summary>
 /// Occurs when Time Vertical Offset property is set
 /// </summary>
 /// <param name="sender">The source</param>
 /// <param name="args">The property changed event argument</param>
 internal static void OnTimeVerticalOffSetPropertyChanged(object sender, DependencyPropertyChangedEventArgs args)
 {
     if (args.NewValue != args.OldValue)
     {
         TimerSlider thisInstance = sender as TimerSlider;
         thisInstance.ScrollToVerticalOffset((double)args.NewValue);
     }
 }
 protected override void OnApplyTemplate()
 {
     base.OnApplyTemplate();
     TimerSliderHour = GetTemplateChild("TimerSliderHour") as TimerSlider;
     TimerSliderMinute = GetTemplateChild("TimerSliderMinute") as TimerSlider;
     TxtSplit = GetTemplateChild("TxtSplit") as TextBlock;
     selectedTime = DateTime.Now;
     TimerSliderHour.DateTimeChanged += TimerSliderHour_DateTimeChanged;
     TimerSliderHour.Tapped += TimerSliderHour_Tapped;
     TimerSliderMinute.DateTimeChanged += TimerSliderMinute_DateTimeChanged;
     TimerSliderMinute.Tapped += TimerSliderMinute_Tapped;
     if (this.ForegroundBrush != null)
     {
         this.TimerSliderHour.Foreground = ForegroundBrush;
         this.TimerSliderMinute.Foreground = ForegroundBrush;
         this.TxtSplit.Foreground = ForegroundBrush;
     }
 }
Esempio n. 3
0
 protected override void OnApplyTemplate()
 {
     base.OnApplyTemplate();
     TimerSliderHour   = GetTemplateChild("TimerSliderHour") as TimerSlider;
     TimerSliderMinute = GetTemplateChild("TimerSliderMinute") as TimerSlider;
     TxtSplit          = GetTemplateChild("TxtSplit") as TextBlock;
     selectedTime      = DateTime.Now;
     TimerSliderHour.DateTimeChanged   += TimerSliderHour_DateTimeChanged;
     TimerSliderHour.Tapped            += TimerSliderHour_Tapped;
     TimerSliderMinute.DateTimeChanged += TimerSliderMinute_DateTimeChanged;
     TimerSliderMinute.Tapped          += TimerSliderMinute_Tapped;
     if (this.ForegroundBrush != null)
     {
         this.TimerSliderHour.Foreground   = ForegroundBrush;
         this.TimerSliderMinute.Foreground = ForegroundBrush;
         this.TxtSplit.Foreground          = ForegroundBrush;
     }
 }