public CourseListItemControl(Course pCourseToAssociate)
        {
            InitializeComponent();
            Star = new RatingCell();
            pAssociatedCourse = pCourseToAssociate;
            this.RatingStarContainer.Children.Add(Star);

            ToolTipService.SetBetweenShowDelay(StatusPanel, 0);
            this.RemoveButton.Visibility          = Visibility.Hidden;
            this.TutorialSelectedLabel.Visibility = Visibility.Hidden;
        }
Exemple #2
0
        private static void RatingValueChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e)
        {
            RatingCell          parent      = sender as RatingCell;
            Int32               ratingValue = (Int32)e.NewValue;
            UIElementCollection children    = parent.Children;

            ToggleButton button = null;

            for (Int32 i = 0; i < ratingValue; i++)
            {
                button           = children[i] as ToggleButton;
                button.IsChecked = true;
            }

            for (Int32 i = ratingValue; i < children.Count; i++)
            {
                button           = children[i] as ToggleButton;
                button.IsChecked = false;
            }
        }