阅读背景:

有没有更好的方法使用MVVM模式更新WPF中VisualCollection主机中的DrawingVisual?

来源:互联网 

I am working on a project in WPF that updates the view up to 30 times a second. I'm employing the MVVM pattern to the best of my knowledge and am fairly happy with the results so far. However I'm wondering if there is not a more efficient way to update my DrawingVisuals inside a VisualCollection in my host container. On every property change in my viewmodel, I am finding, removing then re-adding a new DrawingVisual for that viewmodel. With constantly moving objects I feel there should be a better way, such as binding the DrawingVisuals themselves directly to the viewmodel's properties, but what would that look like? As the number of models in the simulation grows, I need to ensure I have a streamlined workflow for updates. I started following the example here: I am working on a project in WPF that updates t




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: