locked
MessageDialog causes SettingsFlyout to dissapear

Answers

  • I have removed the dialog in favor of a XAML binding solution. My settings pane includes "credential sets" where the user enters their information.  The device can be shared between individuals so multiple sets can be stored. There's a "validate" button for the application to test out the credentials that are entered.  

    The message dialog would show when the validation occurred or to tell the user why something failed. It's also used as a Yes/No prompt for questions such as confirmation when a user chooses to delete one of the credential sets.

    Rather than show the dialog as before, I added a StackPanel with all the items I need to handle this. The Visibility is bound to a Boolean property of my model, with a converter. The other stack panels are bound as well however the visibility result is flipped.  Altering this Boolean property between true/false gives the impression a dialog is being shown.

    The language was C#, however this issue can be closed as this solves it for me.

    Two screenshots of what I'm referring to and how I am solving it:

    Monday, March 31, 2014 3:31 PM

All replies

  • I think the problem is that the SettingsFlyout has a "light dismiss" feature, which is invoked when the MessageDialog appears. I'm not sure that this is possible.  However, if you give me some code to experiment with, I'll test it out.

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Thursday, March 27, 2014 8:50 PM
    Moderator
  • How do I give you code? It's just a charms bar that has code to show a MessageDialog.  Can I upload a sample project for you somehow?

    Thursday, March 27, 2014 9:16 PM
  • You can share a link to your sample on your OneDrive.

    It would also help if you could let us know the language you are using so we can move this to an appropriate forum. From a UI design point of view, I'd recommend not using MessageDialog. As Matt says, settings are intentionally light weight, so modally blocking the UI from them is counterproductive.

    Why do you think a MessageDialog is needed here? What is the scenario?

    --Rob

    Monday, March 31, 2014 3:02 PM
    Owner
  • I have removed the dialog in favor of a XAML binding solution. My settings pane includes "credential sets" where the user enters their information.  The device can be shared between individuals so multiple sets can be stored. There's a "validate" button for the application to test out the credentials that are entered.  

    The message dialog would show when the validation occurred or to tell the user why something failed. It's also used as a Yes/No prompt for questions such as confirmation when a user chooses to delete one of the credential sets.

    Rather than show the dialog as before, I added a StackPanel with all the items I need to handle this. The Visibility is bound to a Boolean property of my model, with a converter. The other stack panels are bound as well however the visibility result is flipped.  Altering this Boolean property between true/false gives the impression a dialog is being shown.

    The language was C#, however this issue can be closed as this solves it for me.

    Two screenshots of what I'm referring to and how I am solving it:

    Monday, March 31, 2014 3:31 PM
  • Thanks for the update. That sounds like a much friendlier solution!
    Monday, March 31, 2014 9:18 PM
    Owner