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 在窗口外加载元素。
这是我的问题:加载时不在窗口内的所有内容都不会显示,即使我使用情节提要将它们放回窗口也是如此。
这是 Visual Studio 的 XAML 编辑器内部发生的一个示例:我创建了一个大按钮,我Storyboard使用TranslateTransform它使其回到可视区域内:
Storyboard
TranslateTransform
如您所见,按钮是根据窗口边界剪切的:
然后我使用情节提要移动它,按钮的其余部分没有显示。
知道为什么会这样吗?我尝试了一个空白项目,但无法重现该错误。