Mark item within PopUpMenu RRS feed

  • Question

  • Is it possible to show an entry within a PopUpMenu as selected?

    I try to show the user what was selected last time.

    Monday, February 4, 2013 9:30 PM


All replies

  • It doesnlt look like you can, by looking at the PopUpMenu class and the UICommand class, they don't look styleable on first impression.

    However, you can achieve this with a Popup object with a listbox inside it, and you set myPopup.IsOpen to true on Holding.



    Tuesday, February 5, 2013 12:09 AM
  • With the message dialog, which are presented as a full page popup, the first item you list is the default, in this case cancel.

    bool? result = null;
    var confirmDelete = new MessageDialog("Are you sure you want to permanently delete these " + lvProjectResults.SelectedItems.Count + " project file(s)?  This cannot be undone.", "Confirm deletion");
    confirmDelete.Commands.Add(new UICommand("Cancel", cmd => result = false));
    confirmDelete.Commands.Add(new UICommand("OK", cmd => result = true));

    Tuesday, February 5, 2013 4:01 PM
  • @G_J_P, I don't think he means "selected" as the default option. I think he wants to highlight an option in the menu.


    Tuesday, February 5, 2013 8:40 PM
  • Hi,

    As far as I know, we cannot customer the PopupMenu. We can only add UICommand and UICommandSeparator. Please check this namespace

    On the other hand, we can use another control instead of Popupmenu and show it in right click event.

    Best regards,

    Jesse Jiang
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, February 6, 2013 7:32 AM
  • Hi everybody,

    I want to highlight the current state withing the PopupMenu.

    Select a color for example. The current color should be highlighted.

    You can see it exactly in my app:


    I think I will try to mark the current color with the a separator. Not very nice but helpful.

    Kind regards,


    • Edited by prog_1 Wednesday, February 6, 2013 9:48 AM
    Wednesday, February 6, 2013 9:47 AM
  • You're much better off using a Popup with a listbox inside it.
    Wednesday, February 6, 2013 9:06 PM