public void EnsureValidatesOnCurrentItemChanged()
        {
            PagedCollectionView pcv = new PagedCollectionView(new List <DataClassWithValidation>()
            {
                new DataClassWithValidation(),
                new DataClassWithValidation(),
                new DataClassWithValidation(),
            });

            this.DataForm.CurrentItem = null;
            this.DataForm.ItemsSource = pcv;

            this.AddToPanelAndWaitForLoad();

            this.EnqueueCallback(() =>
            {
                Assert.IsTrue(this.DataForm.IsItemValid);
                this.ExpectContentLoaded();
                this.DataForm.BeginEdit();
            });

            this.WaitForContentLoaded();

            this.EnqueueCallback(() =>
            {
                this.GetInputControls();

                SetValue(this.textBox, "0");
                this.CommitAllFields();

                Assert.IsTrue(this.DataForm.IsItemValid);

                pcv.MoveCurrentToNext();

                Assert.IsTrue(this.DataForm.IsEditing);
                Assert.IsFalse(this.DataForm.IsItemValid);
                Assert.AreEqual(0, pcv.CurrentPosition);

                SetValue(this.textBox, "test string 0");

                this.ExpectContentLoaded();
                pcv.MoveCurrentToNext();
            });

            this.WaitForContentLoaded();

            this.EnqueueCallback(() =>
            {
                Assert.IsFalse(this.DataForm.IsEditing);
                Assert.IsTrue(this.DataForm.IsItemValid);
                Assert.AreEqual(1, pcv.CurrentPosition);

                this.ExpectContentLoaded();
                this.DataForm.BeginEdit();
            });

            this.WaitForContentLoaded();

            this.EnqueueCallback(() =>
            {
                this.ExpectContentLoaded();
                pcv.MoveCurrentToNext();
            });

            this.WaitForContentLoaded();
            this.EnqueueTestComplete();
        }