Ejemplo n.º 1
0
        public override bool Equals(object obj)
        {
            // If parameter is null return false.
            if (obj == null)
            {
                return(false);
            }

            // If parameter cannot be cast to TextRunFormatting return false.
            TextRunFormatting o = obj as TextRunFormatting;

            if ((System.Object)o == null)
            {
                return(false);
            }

            // Return true if the fields match:
            return(Size.Equals(o.Size) &&
                   FormattingType.Equals(o.FormattingType));
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Creates a new text run with the specified parameters.
 /// </summary>
 /// <param name="text">The text to render.</param>
 /// <param name="formatting">How the text should be formatted.</param>
 public TextRun(string text, TextRunFormatting formatting)
 {
     Text = text;
     Formatting = formatting;
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Creates a new text run with the specified parameters.
 /// </summary>
 /// <param name="text">The text to render.</param>
 /// <param name="formatting">How the text should be formatted.</param>
 public TextRun(string text, TextRunFormatting formatting)
 {
     Text       = text;
     Formatting = formatting;
 }