WPF ViewModel无效的演示者

编程入门 行业动态 更新时间:2024-10-22 23:43:57
本文介绍了WPF ViewModel无效的演示者的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

有一个包含一些相关对象的ViewModel(节点和线条(,如何在View中显示(同步)这些VM并保持对象连接。)我使用一些DataTemplate映射模型以查看,但是每个对象都将被同步(具有强大的绑定)到相关对象,但是我如何将这个DataTemplate生成的UI元素链接(和同步)我从另一个角度描述问题: 同步视图模型和视图

There is a ViewModel that consists of some related object (nodes and lines( , How it can be possible to display (synchronize) these VM in View and keep object connections. I use some DataTemplate to map model to view but each object would be synchronized (with powerful binding) to its related object but how can i link (and synchronize) this DataTemplate generated UI element together. I describe problem from another viewpoint here: Sunchronizing view model and view

推荐答案

您可以使用中继命令逻辑来同步VM和视图。

You can synchronize the VM and View using Relaying Command Logic.

您可以在此处查看示例锻炼

you can see a sample workout here

使用MVVM在WPF中绑定窗口的 WindowState属性

更多推荐

WPF ViewModel无效的演示者

本文发布于:2023-11-08 07:05:42,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1568682.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:演示   WPF   ViewModel

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!