AutoHide doesn't work (intermittently) on windows 8 touch devices.

Topics: Windows 8 Xaml
Jan 19, 2013 at 5:15 AM

First of all...Thanks for great work!!!!!! Player framework is beautiful and easy to use!

I had to copy entertainment.xaml to my project because I wanted to make some modification on what and how controls displayed. 

Controls (play/pause button/progress slider etc) auto hides after few seconds. this works great except in case of surface. If I tap controls appears, but never hides. I have to tap again to hide them. this is annoying in case of playlist scenario. non-full screen works fine (except sometimes). things work great on amd64 (fullscreen/normal mode). 

any idea?

Coordinator
Jan 21, 2013 at 9:23 PM

There are 2 properties: InteractiveDeactivationMode & AutoHideBehavior that will control how and when the control panel is dismissed. I think what you want is InteractiveDeactivationMode = All and AutoHideBehavior = All. Here are the definitions of the possible values:

    /// <summary>
    /// Used to indicate how the AutoHide feature works.
    /// </summary>
    [Flags] 
    public enum AutoHideBehavior
    {
        /// <summary> 
        /// The AutoHide feature has no special behavior.
        /// </summary> 
        None = 0,
        /// <summary> 
        /// AutoHide is allowed during media playback only.
        /// </summary> 
        AllowDuringPlaybackOnly = 1,
        /// <summary> 
        /// AutoHide is prevented when the pointer is over the control panel (and other interactive elements).
        /// </summary> 
        PreventDuringInteractiveHover = 2,
        /// <summary> 
        /// Apply all available AutoHide behaviors.
        /// </summary> 
        All = 3
    }

    /// <summary>
    /// Used to indicate the how interaction by the user causes the UI to be activated or deactivated.
    /// </summary>
    [Flags]
    public enum InteractionType
    {
        /// <summary>
        /// Represents no interaction.
        /// </summary>
        None = 0,
        /// <summary>
        /// Indicates a "soft" interaction (a mouse movement in case case of interactivate activation or a timer timeout in the case of deactivation).
        /// </summary>
        Soft = 1,
        /// <summary>
        /// Indicates a "hard" interaction such as a tap or click.
        /// </summary>
        Hard = 2,
        /// <summary>
        /// Indicates both "soft" and "hard" interactions.
        /// </summary>
        All = 3,
    }
Feb 1, 2013 at 4:33 AM
Thanks for your response. I tried that. I still see the issue. frustrating part is it doesnt reproduce 100%. most of the time autohide works. something triggers and it stops working for a while. only weird thing I am doing is copying entertainment.xaml them to my project and modifying to customize style.
Mar 14, 2013 at 3:36 AM
I am still stuck with this :(. any ideas ?
Mar 17, 2013 at 2:47 AM
I just checked other apps who uses entertainment theme. all have same problem on surface RT. at some point it stops auto hiding. rebooting machine fixes the problem.
Coordinator
Mar 18, 2013 at 5:32 PM
Thanks for the additional info, based on your tests are you confident this is a Windows RT specific issue (vs. a touch screen issue)? Also, do you have to reboot to fix or will closing the app (drag from top to bottom to close an app or hit Alt+F4) also reset the issue?
Mar 22, 2013 at 7:07 PM
Tim - excellent question :). I was ignorant. this is indeed touch issue. I see same issue on Samsung amd64 tablet too. I never saw problem on my laptop or desktop (non touch). no closing an app doesn't resolve the issue. rebooting help.
Coordinator
Mar 22, 2013 at 8:02 PM
Thanks again Jack, are you able to reproduce the problem without using the mouse or keyboard at all? I haven't been able to reproduce the issue on my touch screen but looking at the code, the only thing I can think of is that if a control has keyboard focus or if the mouse is hovering over a control, auto hide is ignored. For example, if you use the mouse to hover over the control panel, then touch the screen, the mouse cursor is hidden but it is technically still hovering over the control panel and therefore auto hide is not triggered. Could this be what is happening?
Apr 6, 2013 at 2:54 AM
yes I am able to repro without keyboard/mouse. good observation though. I was able to set focus through keyboard and keep controls on forever on my laptop. I use surface most of the time without attaching keyboard. nike tablet doesn't have keyboard. BTW if I have a repro and I snap new app while my app is up, controls hides. One of the possible repro is keep surface for on for a long time (may be run app that keeps screen on). Also not all apps (that uses entertainment theme) have a problem. Right now my app and couple of having a repro but few other apps hides controls fine.