private bool IsSameAppearance(IAppearanceProvider a1, IAppearanceProvider a2) { return(a1 == a2 || a1 != null && a2 != null && (a1.StrokeThickness == a2.StrokeThickness && a1.StrokeDashType == a2.StrokeDashType) && (a1.Opacity == a2.Opacity && ValueHelper.CompareBrushes(a1.Stroke, a2.Stroke) && ValueHelper.CompareEffects(a1.Effect, a2.Effect))); }