public override int GetHashCode() { unchecked { var hashCode = (Typeface != null ? Typeface.GetHashCode() : 0); hashCode = (hashCode * 397) ^ FontRenderingEmSize.GetHashCode(); return(hashCode); } }
public override int GetHashCode() { unchecked { var hashCode = (Typeface != null ? Typeface.GetHashCode() : 0); hashCode = (hashCode * 397) ^ FontRenderingEmSize.GetHashCode(); hashCode = (hashCode * 397) ^ (TextDecorations != null ? TextDecorations.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (ForegroundBrush != null ? ForegroundBrush.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (BackgroundBrush != null ? BackgroundBrush.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (CultureInfo != null ? CultureInfo.GetHashCode() : 0); return(hashCode); } }
public bool Equals(TextRunProperties other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return(Typeface.Equals(other.Typeface) && FontRenderingEmSize.Equals(other.FontRenderingEmSize) && Equals(TextDecorations, other.TextDecorations) && Equals(ForegroundBrush, other.ForegroundBrush) && Equals(BackgroundBrush, other.BackgroundBrush) && Equals(CultureInfo, other.CultureInfo)); }
public bool Equals(TextFormat other) { return(Typeface.Equals(other.Typeface) && FontRenderingEmSize.Equals(other.FontRenderingEmSize)); }