示例#1
0
        private static void OnRouteChangedStatic(DependencyObject sender, DependencyPropertyChangedEventArgs e)
        {
            RouteListingControl typedSender = (RouteListingControl)sender;
            BusRoute            route       = (BusRoute)e.NewValue;

            typedSender.RouteNameBlock.Text        = route.Name;
            typedSender.RouteDescriptionBlock.Text = route.Description;
        }
示例#2
0
 private static void OnShowProgressChangedStatic(DependencyObject sender, DependencyPropertyChangedEventArgs e)
 {
     if ((bool)e.NewValue != (bool)e.OldValue)
     {
         RouteListingControl typedSender = (RouteListingControl)sender;
         //DoubleAnimation animation = new DoubleAnimation() { To = (bool)e.NewValue ? 3 : 0, Duration = TimeSpan.FromSeconds(0.25) };
         //Storyboard.SetTarget(animation, typedSender.MainProgressBar);
         //Storyboard.SetTargetProperty(animation, "Height");
         //Storyboard sb = new Storyboard();
         //sb.Children.Add(animation);
         //sb.Begin();
         typedSender.MainProgressBar.Height = (bool)e.NewValue ? 3 : 0;
     }
 }
示例#3
0
        private static void OnIsDownloadedChangedStatic(DependencyObject sender, DependencyPropertyChangedEventArgs e)
        {
            RouteListingControl typedSender = (RouteListingControl)sender;
            DownloadStatus      status      = (DownloadStatus)e.NewValue;

            switch (status)
            {
            case DownloadStatus.NotDownloaded:
                typedSender.DownloadStatusBlock.Text = "";
                break;

            case DownloadStatus.Downloaded:
                typedSender.DownloadStatusBlock.Text = "";
                break;

            case DownloadStatus.Downloading:
                typedSender.DownloadStatusBlock.Text = "";
                break;
            }
        }