c# - WPF : why two way communication between UI and Rendering thread

标签 c# wpf

我不明白为什么在 WPF 架构中 UI 和渲染线程之间有两种通信方式??。

UI 线程将视觉合成数据传输到渲染线程以在 UI 上渲染。但是为什么以及什么数据从渲染线程传输到 UI。

甚至我想知道 WPF 中如何处理用户交互。

我能否获得良好的链接,以便我阅读或理解 WPF 中的 UI 交互处理? WPF 中如何处理 UI 上的用户交互。

enter image description here

最佳答案

A Dispatcher负责管理线程的工作。

UI线程是渲染UI的线程。

UI 线程在称为 Dispatcher 的对象中对工作项进行排队。调度员按优先级选择工作项并运行每个工作项直至完成。每个 UI 线程必须至少有一个 Dispatcher,并且每个 Dispatcher 只能在一个线程中执行工作项。

From this article. Read it for a more thorough description of the UI Rendering in WPF

关于c# - WPF : why two way communication between UI and Rendering thread,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22626123/

相关文章:

c# - 扩展 System.Windows.Forms.Button 并更改 c# 中的默认文本

C# - 常量集合

c# - .NET 依赖管理和标记/分支

c# - 辅助功能自动化属性 "Name"是否需要本地化?

.net - 如何使用鼠标光标在屏幕上最大化 WPF 窗口?

c# - 如何在 MediaPlayer 中播放来自 SpeechSynthesizer 的 wav 文件

c# - 包装 C++ 函数以在 C# 中使用

c# - Revit API构建: How to put drop down list in a dialog box?

c# - 通过 WPF 命令模式启用提交/取消按钮

c# - 动态绑定(bind)——根据列解析属性名