Beispiel #1
0
        private double CalculateTotalHeight2()
        {
            double    num1    = 0.0;
            Thickness margin1 = ((FrameworkElement)this.textBlockTitle).Margin;
            // ISSUE: explicit reference operation
            double num2 = margin1.Top + ((FrameworkElement)this.textBlockTitle).ActualHeight;

            margin1 = ((FrameworkElement)this.textBlockTitle).Margin;
            // ISSUE: explicit reference operation
            double    bottom1 = margin1.Bottom;
            double    num3    = num2 + bottom1;
            double    num4    = num1 + num3;
            Thickness margin2 = ((FrameworkElement)this.textBlockDescrption).Margin;
            // ISSUE: explicit reference operation
            double num5 = ((Thickness)@margin2).Top + ((FrameworkElement)this.textBlockDescrption).ActualHeight;

            margin2 = ((FrameworkElement)this.textBlockDescrption).Margin;
            // ISSUE: explicit reference operation
            double bottom2 = ((Thickness)@margin2).Bottom;
            double num6    = num5 + bottom2;
            double num7    = num4 + num6;

            foreach (PollAnswerHeader answer in this._viewModel.Answers)
            {
                num7 += TextBlockMeasurementHelper.MeasureHeight(332.0, answer.AnswerStr, new FontFamily("Segoe WP"), 20.0, 26.0, (LineStackingStrategy)1, (TextWrapping)2, new Thickness(12.0, 8.0, 96.0, 14.0));
                num7 += 8.0;
            }
            return(num7 + 8.0);
        }
Beispiel #2
0
 public static double CalculateHeight(NewsActivityComment activityComment)
 {
     return(TextBlockMeasurementHelper.MeasureHeight(364.0, UIStringFormatterHelper.SubstituteMentionsWithNames((activityComment != null ? activityComment.text : null) ?? ""), new FontFamily("Segoe WP"), 20.0, 24.0, (LineStackingStrategy)1, (TextWrapping)2, new Thickness()) > 24.0 ? 96.0 : 72.0);
 }
        public static double CalculateHeight(double width, NewsActivityLikes activityLikes, List <User> users)
        {
            int userImagesWidth = NewsActivityLikesUC.CalculateUserImagesWidth(activityLikes);

            return(TextBlockMeasurementHelper.MeasureHeight(NewsActivityLikesUC.CalculateTextWidth(width, userImagesWidth), NewsActivityLikesUC.GetCaptionText(activityLikes, (IReadOnlyCollection <User>)users), new FontFamily("Segoe WP"), 18.0, 26.0, (LineStackingStrategy)1, (TextWrapping)2, new Thickness()) > 26.0 ? 82.0 : 56.0);
        }