/// <inheritdoc cref="object.GetHashCode"/> public override int GetHashCode() => - 711844102 ^ Scale.GetHashCode() ^ DisplayHeaderFooter.GetHashCode() ^ EqualityComparer <string> .Default.GetHashCode(HeaderTemplate) ^ EqualityComparer <string> .Default.GetHashCode(FooterTemplate) ^ PrintBackground.GetHashCode() ^ Landscape.GetHashCode() ^ EqualityComparer <string> .Default.GetHashCode(PageRanges) ^ EqualityComparer <PaperFormat> .Default.GetHashCode(Format) ^ EqualityComparer <object> .Default.GetHashCode(Width) ^ EqualityComparer <object> .Default.GetHashCode(Height) ^ EqualityComparer <MarginOptions> .Default.GetHashCode(MarginOptions) ^ PreferCSSPageSize.GetHashCode();
private void SaveBrush(SerializationInfo info) { if (PrintBackground == null) { return; // Kein Pinsel angegeben } if (PrintBackground is SolidColorBrush) // Wenn es ein solider Pinsel ist { info.AddValue("PrintBackgroundBrush", PrintBackgroundString); return; } var image = PrintBackground.Clone() as ImageBrush; if (image == null) { return; // Wenn es auch kein ImageBrush ist, zurück } info.AddValue("PrintImage", Utilities.ConvertImageToByteArray(image.ImageSource)); //Bild speichern image.ImageSource = null; // ImageSource leeren, weil der Pinsel sonst beim Laden probleme macht info.AddValue("PrintBackgroundBrush", PrintBackgroundString); }