Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

503
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar

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 Denunciar

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda