gpt4 book ai didi

c# - 选项卡更改时刷新/重新加载 MUI WPF 页面

转载 作者:太空宇宙 更新时间:2023-11-03 13:24:35 25 4
gpt4 key购买 nike

我正在使用 Modern UI for WPF 开发桌面应用程序。当我转到新标签页时,我尝试刷新我的标签页,但我不能。

当我使用标签 Controller 转到另一个页面时,我想刷新我的 MUI WPF 标签页。

谁能帮帮我?

最佳答案

我不太清楚你的意思,但是通过在控件上调用 InvalidateVisual() ,你可以强制刷新它的视觉效果(如果你想要的话),因为听起来你有一个 WPF数据更改时未更新的控件。

基于MSDN documentation ,这个:

Invalidates the rendering of the element, and forces a complete new layout pass. OnRender is called after the layout cycle is completed.

例如:

        var grid = new Grid();
// Our grid should refresh after this,
// although in normal circumstances it would by default regardless.
grid.InvalidateVisual();

希望对你有用。

关于c# - 选项卡更改时刷新/重新加载 MUI WPF 页面,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22877919/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com