public Rating_Tablet() { //Rating 1 rating1 = new SFRating(); rating1.ItemCount = 5; rating1.Precision = SFRatingPrecision.Standard; rating1.TooltipPlacement = SFRatingTooltipPlacement.None; rating1.ItemSize = 30; rating1.Value = 3; rating1.ItemSpacing = 30; rating1.Delegate = new RatingControlTabletDelegate(); //RatingSettings SFRatingSettings ratingSetting = new SFRatingSettings(); ratingSetting.RatedFill = UIColor.FromRGB(251, 209, 10); ratingSetting.RatedStroke = UIColor.FromRGB(251, 209, 10); //Rating 2 rating2 = new SFRating(); rating2.ItemCount = 5; rating2.RatingSettings = ratingSetting; rating2.Precision = SFRatingPrecision.Half; rating2.TooltipPlacement = SFRatingTooltipPlacement.None; rating2.ItemSize = 10; rating2.Readonly = true; rating2.Value = (nfloat)3.5; rating2.ItemSpacing = 5; mainPageDesign(); autoHide(); loadOptionView(); }
public Rating_Mobile() { SFRatingSettings ratingSetting1 = new SFRatingSettings(); ratingSetting1.RatedStrokeWidth = 2; ratingSetting1.UnRatedStrokeWidth = 2; //Rating 1 rating1 = new SFRating(); rating1.ItemCount = 5; rating1.Precision = SFRatingPrecision.Standard; rating1.TooltipPlacement = SFRatingTooltipPlacement.None; rating1.ItemSize = 30; rating1.RatingSettings = ratingSetting1; rating1.Value = 3; rating1.ItemSpacing = 5; rating1.EnableAutoSize = true; rating1.ValueChanged += Rating_ValueChanged; //RatingSettings SFRatingSettings ratingSetting = new SFRatingSettings(); ratingSetting.RatedFill = UIColor.FromRGB(251, 209, 10); ratingSetting.RatedStroke = UIColor.FromRGB(251, 209, 10); //Rating 2 rating2 = new SFRating(); rating2.ItemCount = 5; rating2.RatingSettings = ratingSetting; rating2.Precision = SFRatingPrecision.Half; rating2.TooltipPlacement = SFRatingTooltipPlacement.None; rating2.ItemSize = 10; rating2.Readonly = true; rating2.Value = (nfloat)3.5; rating2.ItemSpacing = 5; this.AddSubview(rating1); this.AddSubview(rating2); mainPageDesign(); }
public override void DidValueChanged(SFRating sfRating, nfloat value) { (sfRating.Superview.Superview as Rating_Tablet).SetValue(value); }