隐藏wpf中的默认调整大小夹点
我在 WPF 中有一个无边框透明窗口,底部有一些精美的装饰。 有一个自定义页脚,带有一些非常规曲线,并且不显示公司徽标。 该窗口需要像传统窗口一样通过右下角的手柄来调整大小。
无论如何,我已将自己的 ResizeGrip 放在实际上位于页脚上的位置,但是默认夹点仍然显示,并且由于不可见的窗口,它漂浮在空间中。
如何隐藏默认的 ResizeGrip?
I have a borderless and transparent window in WPF, with some fancy decoration at the bottom. There's a custom footer with some non conventional curves and what not showing the company logo. This window needs to be resizable with a grip in the bottom right corner like conventional windows.
Anyways, I have put my own ResizeGrip in a place that is actually on the footer, however the default grip still shows up and it's floating in space due to the invisible window.
How do I hide the default ResizeGrip?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
调整大小夹点的外观通过 ResizeMode Window 上的依赖属性。
如果设置为 CanResizeWithGrip:
窗口将如下所示:
如果设置为 CanResize(默认):
窗口将如下所示:
net/FMgAY.png" rel="noreferrer">
The appearance of a resize grip is controlled via the ResizeMode dependency property on the Window.
If this is set to CanResizeWithGrip:
The Window will look like this:
If it is set to CanResize (the default):
The Window will look as follows:
因此,为了隐藏默认夹点,我覆盖了默认的 ResizeGrip 样式,使其可见性被隐藏。 借助 Expression Blend 2 即可轻松完成。
然后,我在自定义窗户装饰上设置了自己的 ResizeGrip,其样式与默认抓握样式相同。
So to hide the default grip, I overwrote the default ResizeGrip style such that it's visibility is hidden. Easy with the help of Expression Blend 2.
Then I set up my own ResizeGrip on my custom window decoration with a style that is identical to the default grip style.