static public void Transform (Brush b) { Assert.IsNotNull (b.Transform, "Transform"); MatrixTransform mt = (b.Transform as MatrixTransform); Matrix m = mt.Matrix; m.M11 = 2.0; Assert.IsTrue (mt.Matrix.IsIdentity, "OldCopy/Identity"); b.Transform = null; Assert.IsNotNull (b.Transform, "Transform/NeverNull"); Assert.IsTrue ((b.Transform as MatrixTransform).Matrix.IsIdentity, "Transform/Null/Identity"); b.SetValue (Brush.TransformProperty, null); Assert.IsNotNull (b.Transform, "Transform/NeverNullDP"); }