コード例 #1
0
        protected override void CreateChildElements()
        {
            base.CreateChildElements();
            this.ratingElement = new RadRatingElement();
            ratingElement.StretchHorizontally    = true;
            ratingElement.StretchVertically      = true;
            ratingElement.ShouldHandleMouseInput = false;
            ratingElement.ReadOnly = true;
            ratingElement.Minimum  = 0;
            ratingElement.Maximum  = 5;

            this.ratingElement.CaptionElement.Visibility     = ElementVisibility.Collapsed;
            this.ratingElement.DescriptionElement.Visibility = ElementVisibility.Collapsed;
            this.ratingElement.SubCaptionElement.Visibility  = ElementVisibility.Collapsed;

            for (int i = 0; i < 5; i++)
            {
                RatingStarVisualElement star = new RatingStarVisualElement();
                star.MinSize = new System.Drawing.Size(10, 10);
                this.ratingElement.Items.Add(star);
            }
            this.ratingElement.IsInRadGridView = true;
            this.Children.Add(ratingElement);
        }
コード例 #2
0
 protected override void DisposeManagedResources()
 {
     base.DisposeManagedResources();
     ratingElement = null;
 }