/// <inheritdoc/> public override int GetHashCode() { int result = size.GetHashCode(); result = 29 * result + (culture != null ? culture.GetHashCode() : 0); result = 29 * result + flowDirection.GetHashCode(); result = 29 * result + size.GetHashCode(); result = 29 * result + textAlignment.GetHashCode(); result = 29 * result + (numberSubstitution != null ? numberSubstitution.GetHashCode() : 0); result = 29 * result + (textDecorations != null ? textDecorations.GetHashCode() : 0); result = 29 * result + textTrimming.GetHashCode(); result = 29 * result + textAlignment.GetHashCode(); return(result); }
private static int ComputeRowStyleHash( double rowHeight, FlowDirection flowDirection, Typeface typeface, double fontSize, Brush foreground) { const int primeFactor = 397; unchecked { int hash = rowHeight.GetHashCode(); hash = (hash * primeFactor) ^ flowDirection.GetHashCode(); hash = (hash * primeFactor) ^ (typeface?.GetHashCode() ?? 0); hash = (hash * primeFactor) ^ fontSize.GetHashCode(); hash = (hash * primeFactor) ^ (foreground?.GetHashCode() ?? 0); return(hash); } }