且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

看不到状态栏

更新时间:2022-12-30 20:09:47

您在 StatusBar 之外声明了 Label.没有 Child 的状态栏是看不到的,因为 ActualHeight 会是 0.为了解决这个问题,把 Label 放在 StatusBar 里面.

You declared the Label outside of StatusBar. A statusbar without Child cannot be seen, since the ActualHeight would be 0. To solve the problem, put the Label inside the StatusBar.

<DockPanel>
    <StatusBar DockPanel.Dock="Bottom">
        <Label>StatusBar Example</Label>
    </StatusBar>
</DockPanel>