Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 WPF 应用程序的网格内有一个画布。我想根据 Kinect 数据在 Canvas 中绘制骨架。但是 Canvas 的宽度很小,大概是 1px。Grid 使其缩小,而不是保持其设置的宽度和高度。如何使 Grid 保持其声明的大小?
HorizontalAlignment="Stretch"确保网格和画布都有VerticalAlignment="Stretch"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"