Exemplo n.º 1
0
        public void SetStrokesToNull()
        {
            InkPresenter ink = new InkPresenter();
            object       strokes;

            // check that ReadLocalValue returns a collection after setting it to null via the property accessor
            ink.Strokes = null;
            strokes     = ink.ReadLocalValue(InkPresenter.StrokesProperty);
            Assert.IsTrue(strokes is StrokeCollection, "ReadLocalValue after setting to null returns a collection");

            // check that ReadLocalValue returns a collection after SetValue to null
            ink.SetValue(InkPresenter.StrokesProperty, null);
            strokes = ink.ReadLocalValue(InkPresenter.StrokesProperty);
            Assert.IsTrue(strokes is StrokeCollection, "ReadLocalValue after SetValue(null) returns a collection");
        }