WPF AppBar autohide implementation

2019-07-16 12:38发布

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.

1条回答
小情绪 Triste *
2楼-- · 2019-07-16 13:22

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.

查看更多
登录 后发表回答