我有一个DataGrid,它将DataTable设置为ItemsSource.DataTable中持有24列〜1600行(其实我会稍后加载很多更行,但现在这已经足够了麻烦).
尽管将列和行的虚拟化设置为活动,但DataGrid大约需要30秒才能显示这1600行.在那之后,垂直滚动工作正常,水平延迟,但你会期望它相反.
如果我运行内存设置,我可以确认,大多数应用程序所使用的内存来自DataGridCells,边框,ContentPresenters和的TextBlocks.对我来说,这表明网格没有正确地虚拟化其行.
任何人都可以确认DataGrid的虚拟化存在问题吗?或者在这个控件的实现中是否存在某种臭名昭着的陷阱?
期待任何形式的意见/建议.谢谢 :)
我有一个CodedUiTest,它有几种测试方法.每次我通过MSTest从命令行执行测试时,我希望能够将不同的路径传递给测试.我怎样才能做到这一点?
这就是我现在执行测试的方式:
{
System.Diagnostics.Process codedUIProcess = new System.Diagnostics.Process();
System.Diagnostics.ProcessStartInfo codedUIStartInfo = new System.Diagnostics.ProcessStartInfo();
codedUIStartInfo.FileName = @"C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\MSTest.exe";
codedUIStartInfo.Arguments = @"/testcontainer:C:\DailyBuildAutoTest.dll /test:MyUITestAssembly\MyCodedUITest";
codedUIStartInfo.CreateNoWindow = true;
codedUIProcess.StartInfo = codedUIStartInfo;
codedUIProcess.Start();
}
Run Code Online (Sandbox Code Playgroud)
有没有办法将字符串之类的参数传递给"MyCodedUITest"?
我正试图从WPF/XAML进入QT/QML.
在测试GUI中,我使用ListView在单击按钮时显示不同的模型.到目前为止,这个工作正常,当我单击相应的按钮时,视图会一直显示每个模型.但是它仍然会将所有其他模型绘制在自己的边界之外,并将周围的元素与它们重叠.我可以关闭此行为吗?
这是我的ListView:
ListView
{
id: list_view
anchors.fill: parent
model: main_view_model
snapMode: ListView.SnapOneItem
boundsBehavior: Flickable.StopAtBounds
highlightFollowsCurrentItem: true
highlightMoveDuration: 75
highlightRangeMode: ListView.StrictlyEnforceRange
currentIndex: view_index
}
Run Code Online (Sandbox Code Playgroud)
这是ObjectModel:
ObjectModel
{
id: main_view_model
// ListView index 0
TestView1
{
anchors.centerIn: parent.center
width: list_view.width
height: list_view.height
}
// ListView index 1
TestView2
{
anchors.centerIn: parent.center
width: list_view.width
height: list_view.height
}
// ListView index 2
TestView3
{
anchors.centerIn: parent.center
width: list_view.width
height: list_view.height
}
// ListView index 3
TestView4
{
anchors.centerIn: parent.center
width: list_view.width
height: list_view.height …Run Code Online (Sandbox Code Playgroud) 只是一个简单的问题:我只希望我的集会中有一类是公开的,而外界看不到任何其他东西.我只是将所有其他类的方法和属性设置为内部?这甚至是一个好方法吗?