Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

496
Visualizações
How to show a modal window in windows 10 universal app?

When I use Mail univesal app in windows 10, when i add an account (setting->accounts->add account), it seems popup a modal window to choose an account. I try to use MessageDialog, but i can't put any custom content into it.

EDIT : this is the screenshot screenshot

Is someone knows how to implement it or there is some api can do it?

Note: When this window open, you even can't Minimize/Maximize/Close the main Window. So, it is definitely a modal window.

over 4 years ago · Santiago Trujillo
3 Respostas
Responde à pergunta

0

I haven't used it myself yet but i believe you're looking for ContentDialog api.

var dialog = new ContentDialog() {
    Title = "Lorem Ipsum",
    MaxWidth = this.ActualWidth // Required for Mobile!
    Content = YourXamlContent
};


dialog.PrimaryButtonText = "OK";
dialog.IsPrimaryButtonEnabled = false;
dialog.PrimaryButtonClick += delegate {
};

var result = await dialog.ShowAsync();

content dialog

msdn guidlines for dialogs: link

msdn ContentDialog API: link

over 4 years ago · Santiago Trujillo Relatório

0

You can easily create a new view like this, for example in your App.xaml.cs:

public static async Task<bool> TryShowNewWindow<TView>(bool switchToView)
{
    var newView = CoreApplication.CreateNewView();
    int newViewId = 0;
    await newView.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
    {
        var frame = new Frame();
        frame.Navigate(typeof(TView), null);
        Window.Current.Content = frame;

        newViewId = ApplicationView.GetForCurrentView().Id;
    });
    var viewShown = await ApplicationViewSwitcher.TryShowAsStandaloneAsync(newViewId);
    if (switchToView && viewShown)
    {
        // Switch to new view
        await ApplicationViewSwitcher.SwitchAsync(newViewId);
    }
    return viewShown;
}

For further information, take a look at those two guides:

  • Guidelines for multiple windows
  • Quickstart: Creating multiple windows for an app (XAML)
over 4 years ago · Santiago Trujillo Relatório

0

If you use Template10 project template, you can use the ModalDialog control : https://github.com/Windows-XAML/Template10/wiki/Docs-%7C-Controls#modaldialog

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda