Coffeehouse Thread

21 posts

Close a Windows 8 App

Back to Forum: Coffeehouse
  • User profile image
    TexasToast

    I see that you can close an App by grabbing the top of the screen and pulling downward but I do not see how I can do this through programming.  I want to add a close button (app has sensitive data I want it to shut down).   I see no methods in the Application to do this. 

    Edit:

    Maybe I just hide the data on the screen instead for security.   Windows 8 store apps big technical advances are you have a harder time finding an app to launch/start and then you have the same difficulty in stopping/closing it.  I don't understand why they did this. 

  • User profile image
    daSmirnov

    Big advances include users not having to worry about closing apps. Angel

    Let the system worry about it.

  • User profile image
    Bas

    What daSmirnov said. Also, you can use Alt+F4 like you always could.

  • User profile image
    TexasToast

    Found it

    Application.Current.Exit();

    Tied it to a close button..

  • User profile image
    Bas

    @TexasToast: That may cause problems for you when submitting it to the store, since it violates requirement 3.6. If you don't plan to submit it to the store, go for it.

  • User profile image
    TexasToast

    , Bas wrote

    @TexasToast: That may cause problems for you when submitting it to the store, since it violates requirement 3.6. If you don't plan to submit it to the store, go for it.

    I will need to ask for an exception to that rule.   They will understand the need I have for it.  I think the rule is probably going to be changed since you could hit a close button and then put up a dialog and tell the user that he needs to take his mouse or finger (the middle one preferably) and put it at the top of the screen (if mouse push left button) and pull or drag to bottom . (but that would be stupid right?) 

  • User profile image
    wkempf

    I doubt you have a real need. Security isn't one. You app gets lifetime notifications and can easily deal with security concerns when the app is activated after being tombstoned. Expecting to get an exception is unrealistic... you're not likely to get one.

  • User profile image
    evildictait​or

    Logout the user (if you're using some kind of authentication) and then go back to the initial screen. There is no need to close the app.

    If you deliberately try and circumvent rules in the store, all you will achieve is getting your app banned. Annoying the user because you don't like Microsoft's policy is unlikely to go down well either at Microsoft or with your users.

  • User profile image
    JohnAskew

    , evildictait​or wrote

    Logout the user (if you're using some kind of authentication) and then go back to the initial screen. There is no need to close the app.

    If you deliberately try and circumvent rules in the store, all you will achieve is getting your app banned. Annoying the user because you don't like Microsoft's policy is unlikely to go down well either at Microsoft or with your users.

    That sounds like a good solution.

  • User profile image
    TexasToast

    I will have to redesign it slightly where the sensitive data is hidden after a certain time or cause the state of the application to reinitialize itself.   I don't want to break any rules but porting some applications are becoming a bit of a pain and I don't see the big benefits.  There are a few small benefits and I am trying to keep my outlook positive at this point.  I noticed there are quite of few other vendor apps that run on my build 2011 slate but not on my surface.(even Microsoft solitaire)   There are probably a lot of people porting code right now.

  • User profile image
    Bas

    Can you not simply not show the data when the app launches?

  • User profile image
    blowdart

    I'm interested in what data you're displaying, and how you are authenticating to whatever backend system it's on.


    lastpass has a simple timeout - after x number of minutes it logs a user out, and thus nothing sensitive is shown on screen until a user reauthenticates. There's a Deactivate event on your main form you could use to hide when a user starts another app, and then when a user returns and it's under your timeout value redisplay the sensitive data.

  • User profile image
    TexasToast

    , blowdart wrote

    I'm interested in what data you're displaying, and how you are authenticating to whatever backend system it's on.


    lastpass has a simple timeout - after x number of minutes it logs a user out, and thus nothing sensitive is shown on screen until a user reauthenticates. There's a Deactivate event on your main form you could use to hide when a user starts another app, and then when a user returns and it's under your timeout value redisplay the sensitive data.

    Its "a need to know" look at data but hide from accidental viewing.   I am doing pretty much what you stated on hiding the data but leaving app up with re-login showing data again.  Hide key helps too with a timeout.

    Thanks

  • User profile image
    blowdart

    , TexasToast wrote

    *snip*

    Its "a need to know" look at data but hide from accidental viewing.   I am doing pretty much what you stated on hiding the data but leaving app up with re-login showing data again.  Hide key helps too with a timeout.

    Well, let them use Win-L to lock everything if they're really worried Smiley

     

  • User profile image
    TexasToast

    , blowdart wrote

    *snip*

    Well, let them use Win-L to lock everything if they're really worried Smiley

     

     

    Would be nice if you hold the windows key for 1.5 sec you get a quick hot key help.   My users know their stuff but are not always windows savvy.  They need in your face buttons/prompts. I guess bottom line there are a number of ways to handle this problem.

    , Bas wrote

    Can you not simply not show the data when the app launches?

    The app shows nothing on startup and needs an authentication (not tied to windows).  But after this point the data is consumed rather quickly for the most part and then needs to hide till next operation.

  • User profile image
    blowdart

    , TexasToast wrote

    Would be nice if you hold the windows key for 1.5 sec you get a quick hot key help.   My users know their stuff but are not always windows savvy.  They need in your face buttons/prompts. I guess bottom line there are a number of ways to handle this problem.

    CTRL-B? Big Smile

    Generic Forum Image

  • User profile image
    magicalclick

    @daSmirnov:

    tell that to uservoice for truely single tasking WinPh.

    Leaving WM on 5/2018 if no apps, no dedicated billboards where I drive, no Store name.
    Last modified
  • User profile image
    TexasToast

    , blowdart wrote

    *snip*

    CTRL-B? Big Smile

    Oh there is no way CTRL-B will ever be used.   Do you know how small some of my customers hands are? Making that huge stretch (from either side) with one hand.  Pinky and forefinger spread so wide that they cramp up and cause a severe strain to their hand (lawsuit). No not here pal.   I will leave CTRL-B to the big risk takers.  Expressionless

Comments closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.