本文整理汇总了C#中System.Windows.Data.PagedCollectionView.MoveCurrentToNext方法的典型用法代码示例。如果您正苦于以下问题:C# PagedCollectionView.MoveCurrentToNext方法的具体用法?C# PagedCollectionView.MoveCurrentToNext怎么用?C# PagedCollectionView.MoveCurrentToNext使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Data.PagedCollectionView
的用法示例。
在下文中一共展示了PagedCollectionView.MoveCurrentToNext方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: EnsureValidatesOnCurrentItemChanged
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();
}