WPF AppBar实施自动隐藏 [英] WPF AppBar autohide implementation

查看:541
本文介绍了WPF AppBar实施自动隐藏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是初学者学习WPF,并且需要创建一个启动应用程序的应用程序栏。我需要它自动隐藏,但我这个苦苦挣扎。我实现了对接方面的罚款,并把它注册为与窗口的自动隐藏工具栏,但我不知道该如何去实际执行的自动隐藏功能。目前,采用故事板事件我的窗前隐藏通过改变不透明度为0,但随后的酒吧仍然是顶部并阻止所有其他应用程序,所以这完全不是那么回事。

I'm a beginner learning WPF, and need to create an Application Bar that launches applications. I need it to auto hide, but I'm struggling with this. I implemented the docking aspect fine, and registered it as an autohide toolbar with windows, but am unsure how to go about actually implementing the autohide functionality. Currently, my window using a storyboard event to "hide" by changing to opacity to 0, but then the bar will still be 'on top' and block all of the other applications, so this doesn't quite work.

推荐答案

在除了设置你的混浊,能见度设置为在最后崩溃了。一旦元素是透明的,折叠的状态将使其无法通过鼠标击中。做相反的开场动画(能见度设置为可见,然后更改透明度或其他)。

In addition to setting your opacity, set the visibility to collapsed at the end. Once the element is transparent, the collapsed status will make it unable to be hit by mouse. Do the opposite (Visibility set to Visible, then change opacity or whatever) on the opening animation.

这篇关于WPF AppBar实施自动隐藏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆