ContentDialog ContentDialog ContentDialog ContentDialog Class

Definition

Represents a dialog box that can be customized to contain checkboxes, hyperlinks, buttons and any other XAML content.

public : class ContentDialog : ContentControl, IContentDialog, IContentDialog2
public class ContentDialog : ContentControl, IContentDialog, IContentDialog2
Public Class ContentDialog Inherits ContentControl Implements IContentDialog, IContentDialog2
var contentDialog = new contentDialog();
<ContentDialog .../>
-or-
<ContentDialog>
    singleObject
</ContentDialog>
-or-
<ContentDialog>stringContent</ContentDialog>
Inheritance
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Examples

This example shows how to create and show a simple ContentDialog in code.

private async void DisplayNoWifiDialog()
{
    ContentDialog noWifiDialog = new ContentDialog()
    {
        Title = "No wifi connection",
        Content = "Check connection and try again.",
        CloseButtonText = "Ok"
    };

    await noWifiDialog.ShowAsync();
}

This example shows how to create a ContentDialog in the XAML of an app page. Even though the dialog is defined in the app page, it's not shown until you call ShowAsync in your code.

Here, the IsPrimaryButtonEnabled property is set to false. The primary button is enabled in code when the user checks the CheckBox to confirm their age.

The TitleTemplate property is used to create a title that includes both a logo and text.

<ContentDialog x:Name="termsOfUseContentDialog"
           PrimaryButtonText="Accept" IsPrimaryButtonEnabled="False"
           CloseButtonText="Cancel"
           Opened="TermsOfUseContentDialog_Opened">
    <ContentDialog.TitleTemplate>
        <DataTemplate>
            <StackPanel Orientation="Horizontal">
                <Image Source="ms-appx:///Assets/SmallLogo.png" Width="40" Height="40" Margin="10,0"/>
                <TextBlock Text="Terms of use"/>
            </StackPanel>
        </DataTemplate>
    </ContentDialog.TitleTemplate>
    <StackPanel>
        <TextBlock TextWrapping="WrapWholeWords">
        <Run>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas porttitor
             congue massa. Fusce posuere, magna sed pulvinar ultricies, purus lectus
             malesuada libero, sit amet commodo magna eros quis urna.</Run><LineBreak/>
        <Run>Nunc viverra imperdiet enim. Fusce est. Vivamus a tellus.</Run><LineBreak/>
        <Run>Pellentesque habitant morbi tristique senectus et netus et malesuada fames
             ac turpis egestas. Proin pharetra nonummy pede. Mauris et orci.</Run><LineBreak/>
        <Run>Suspendisse dui purus, scelerisque at, vulputate vitae, pretium mattis, nunc.
             Mauris eget neque at sem venenatis eleifend. Ut nonummy.</Run>
        </TextBlock>
        <CheckBox x:Name="ConfirmAgeCheckBox" Content="I am over 13 years of age."
              Checked="ConfirmAgeCheckBox_Checked" Unchecked="ConfirmAgeCheckBox_Unchecked"/>
    </StackPanel>
</ContentDialog>
private async void ShowTermsOfUseContentDialogButton_Click(object sender, RoutedEventArgs e)
{
    ContentDialogResult result = await termsOfUseContentDialog.ShowAsync();
    if (result == ContentDialogResult.Primary)
    {
        // Terms of use were accepted.
    }
    else
    {
        // User pressed Cancel, ESC, or the back arrow.
        // Terms of use were not accepted.
    }
}

private void TermsOfUseContentDialog_Opened(ContentDialog sender, ContentDialogOpenedEventArgs args)
{
    // Ensure that the check box is unchecked each time the dialog opens.
    ConfirmAgeCheckBox.IsChecked = false;
}

private void ConfirmAgeCheckBox_Checked(object sender, RoutedEventArgs e)
{
    termsOfUseContentDialog.IsPrimaryButtonEnabled = true;
}

private void ConfirmAgeCheckBox_Unchecked(object sender, RoutedEventArgs e)
{
    termsOfUseContentDialog.IsPrimaryButtonEnabled = false;
}

This example shows how to create and use a custom dialog (SignInContentDialog) derived from ContentDialog.


<!-- SignInContentDialog.xaml -->
<ContentDialog
    x:Class="ExampleApp.SignInContentDialog"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:ExampleApp"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    Title="SIGN IN"
    PrimaryButtonText="Sign In"  
    CloseButtonText="Cancel"
    PrimaryButtonClick="ContentDialog_PrimaryButtonClick"
    CloseButtonClick="ContentDialog_CloseButtonClick">

    <ContentDialog.Resources>
    <!-- These flyouts or used for confirmation when the user changes
         the option to save their user name. -->
        <Flyout x:Key="DiscardNameFlyout" Closed="Flyout_Closed">
            <StackPanel>
                <TextBlock Text="Discard user name?"/>
                <Button Content="Discard" Click="DiscardButton_Click"/>
            </StackPanel>
        </Flyout>
        <Flyout x:Key="SaveNameFlyout" Closed="Flyout_Closed">
            <StackPanel>
                <TextBlock Text="Save user name?"/>
                <Button Content="Save" Click="SaveButton_Click"/>
            </StackPanel>
        </Flyout>
    </ContentDialog.Resources>

    <StackPanel VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
        <TextBox Name="userNameTextBox" Header="User name"/>
        <PasswordBox Name="passwordTextBox" Header="Password" IsPasswordRevealButtonEnabled="True"/>
        <CheckBox Name="saveUserNameCheckBox" Content="Save user name"/>

        <TextBlock x:Name="errorTextBlock" Style="{StaticResource ControlContextualInfoTextBlockStyle}"/>

        <!-- Content body -->
        <TextBlock Name="body" Style="{StaticResource MessageDialogContentStyle}" TextWrapping="Wrap">
            <TextBlock.Text>
                Lorem ipsum dolor sit amet, consectetur adipisicing elit,
                    sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
            </TextBlock.Text>
        </TextBlock>
    </StackPanel>
</ContentDialog>

// SignInContentDialog.xaml.cs
using System;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;

namespace ExampleApp
{
    public enum SignInResult
    {
        SignInOK,
        SignInFail,
        SignInCancel,
        Nothing
    }

    public sealed partial class SignInContentDialog : ContentDialog
    {
        public SignInResult Result { get; private set; }

        public SignInContentDialog()
        {
            this.InitializeComponent();
            this.Opened += SignInContentDialog_Opened;
            this.Closing += SignInContentDialog_Closing;
        }

        private void ContentDialog_PrimaryButtonClick(ContentDialog sender, ContentDialogButtonClickEventArgs args)
        {
            // Ensure the user name and password fields aren't empty. If a required field
            // is empty, set args.Cancel = true to keep the dialog open.
            if (string.IsNullOrEmpty(userNameTextBox.Text))
            {
                args.Cancel = true;
                errorTextBlock.Text = "User name is required.";
            }
            else if (string.IsNullOrEmpty(passwordTextBox.Password))
            {
                args.Cancel = true;
                errorTextBlock.Text = "Password is required.";
            }

            // If you're performing async operations in the button click handler,
            // get a deferral before you await the operation. Then, complete the
            // deferral when the async operation is complete.

            ContentDialogButtonClickDeferral deferral = args.GetDeferral();    
            if (await SomeAsyncSignInOperation())
            {
                this.Result = SignInResult.SignInOK;
            }
            else
            {
                this.Result = SignInResult.SignInFail;
            }
            deferral.Complete();
        }

        private void ContentDialog_CloseButtonClick(ContentDialog sender, ContentDialogButtonClickEventArgs args)
        {
            // User clicked Cancel, ESC, or the system back button.
            this.Result = SignInResult.SignInCancel;
        }

        void SignInContentDialog_Opened(ContentDialog sender, ContentDialogOpenedEventArgs args)
        {
            this.Result = SignInResult.Nothing;

            // If the user name is saved, get it and populate the user name field.
            Windows.Storage.ApplicationDataContainer roamingSettings = Windows.Storage.ApplicationData.Current.RoamingSettings;
            if (roamingSettings.Values.ContainsKey("userName"))
            {
                userNameTextBox.Text = roamingSettings.Values["userName"].ToString();
                saveUserNameCheckBox.IsChecked = true;
            }
        }

        void SignInContentDialog_Closing(ContentDialog sender, ContentDialogClosingEventArgs args)
        {
            // If sign in was successful, save or clear the user name based on the user choice.
            if (this.Result == SignInResult.SignInOK)
            {
                if (saveUserNameCheckBox.IsChecked == true)
                {
                    SaveUserName();
                }
                else
                {
                    ClearUserName();
                }
            }

            // If the user entered a name and checked or cleared the 'save user name' checkbox, then clicked the back arrow,
            // confirm if it was their intention to save or clear the user name without signing in.
            if (this.Result == SignInResult.Nothing && !string.IsNullOrEmpty(userNameTextBox.Text))
            {
                if (saveUserNameCheckBox.IsChecked == false)
                {
                    args.Cancel = true;
                    FlyoutBase.SetAttachedFlyout(this, (FlyoutBase)this.Resources["DiscardNameFlyout"]);
                    FlyoutBase.ShowAttachedFlyout(this);
                }
                else if (saveUserNameCheckBox.IsChecked == true && !string.IsNullOrEmpty(userNameTextBox.Text))
                {
                    args.Cancel = true;
                    FlyoutBase.SetAttachedFlyout(this, (FlyoutBase)this.Resources["SaveNameFlyout"]);
                    FlyoutBase.ShowAttachedFlyout(this);
                }
            }
        }

        private void SaveUserName()
        {
            Windows.Storage.ApplicationDataContainer roamingSettings = Windows.Storage.ApplicationData.Current.RoamingSettings;
            roamingSettings.Values["userName"] = userNameTextBox.Text;
        }

        private void ClearUserName()
        {
            Windows.Storage.ApplicationDataContainer roamingSettings = Windows.Storage.ApplicationData.Current.RoamingSettings;
            roamingSettings.Values["userName"] = null;
            userNameTextBox.Text = string.Empty;
        }

        // Handle the button clicks from the flyouts.
        private void SaveButton_Click(object sender, RoutedEventArgs e)
        {
            SaveUserName();
            FlyoutBase.GetAttachedFlyout(this).Hide();
        }

        private void DiscardButton_Click(object sender, RoutedEventArgs e)
        {
            ClearUserName();
            FlyoutBase.GetAttachedFlyout(this).Hide();
        }

        // When the flyout closes, hide the sign in dialog, too.
        private void Flyout_Closed(object sender, object e)
        {
            this.Hide();
        }
    }
}

Here's code that shows the SignInContentDialog and uses it's custom SignInResult.


private async void ShowSignInDialogButton_Click(object sender, RoutedEventArgs e)
{
    SignInContentDialog signInDialog = new SignInContentDialog();
    await signInDialog.ShowAsync();

    if (signInDialog.Result == SignInResult.SignInOK)
    {
        // Sign in was successful.
    }
    else if (signInDialog.Result == SignInResult.SignInFail)
    {
        // Sign in failed.
    }
    else if (signInDialog.Result == SignInResult.SignInCancel)
    {
        // Sign in was cancelled by the user.
    }
}

Remarks

Use a ContentDialog to request input from the user, or to show information in a modal dialog. You can add a ContentDialog to an app page using code or XAML, or you can create a custom dialog class that's derived from ContentDialog. Both ways are shown in the examples section of this topic.

Use the Title property to put a title on the dialog. To add a complex title element with more than simple text, you can use the TitleTemplate property.

The ContentDialog has 3 built-in buttons that describe the actions that the user may take in response to the dialog's prompt. All dialogs should have a safe, non-destructive action. Dialogs may also optionally contain one or two specific "do it" actions in response to the prompt.

Use the CloseButtonText and property to set the display text for the safe, non-destructive button. The dialog's close button will also be invoked when the user performs a Cancel action, like pressing the ESC key or pressing the system back button. Use the PrimaryButtonText and SecondaryButtonText properties to display responses to the main question or action posed by the dialog.

The CloseButtonText property is not available prior to Windows 10, version 1703. If your app’s 'minimum platform version' setting in Microsoft Visual Studio is less than the 'introduced version' shown in the Requirements block later in this page, you should use the SecondaryButtonText property instead. For more info, see Version adaptive code.

To show the dialog, call the ShowAsync method. Use the result of this method to determine which of the buttons was clicked, if any button was clicked. If the user presses ESC, the system back arrow, or Gamepad B, the result of this method will be None.

You may optionally choose to differentiate one of the three buttons as the dialog's default button. Use the DefaultButton property to differentiate one of the buttons. This button will receive the Accent Button visual treatment, respond to the ENTER key automatically, and receive focus when the Dialog is opened unless the dialog's content contains focusable elements.

You may wish to do some work before the dialog closes (for example, to verify that the user entered into form fields before submitting a request). You have two ways to do work before the dialog closes. You can handle the PrimaryButtonClick, SecondaryButtonClick, or CloseButtonClick events to get the user's response when the user presses a button and verify the state of the dialog before it closes. You can also handle the Closing event to do work before the dialog closes.

Only one ContentDialog can be shown at a time. To chain together more than one ContentDialog, handle the Closing event of the first ContentDialog. In the Closing event handler, call ShowAsync on the second dialog to show it.

Control style and template

You can modify the default Style and ControlTemplate to give the control a unique appearance. For information about modifying a control's style and template, see Styling controls. The default style, template, and resources that define the look of the control are included in the generic.xaml file. For design purposes, generic.xaml is available in the (Program Files)\Windows Kits\10\DesignTime\CommonConfiguration\Neutral\UAP&lt;SDK version>\Generic folder from a Windows Software Development Kit (SDK) installation. Styles and resources from different versions of the SDK might have different values.

Starting in Windows 10, version 1607 (Windows Software Development Kit (SDK) version 10.0.14393.0), generic.xaml includes resources that you can use to modify the colors of a control in different visual states without modifying the control template. In apps that target this software development kit (SDK) or later, modifying these resources is preferred to setting properties such as Background and Foreground. For more info, see the Light-weight styling section of the Styling controls article.

This table shows the resources used by the ContentDialog control.

Resource keyDescription
ContentDialogForegroundText color in dialog
ContentDialogBackgroundBackground color
ContentDialogBorderBrushBorder color

Constructors

ContentDialog() ContentDialog() ContentDialog() ContentDialog()

Initializes a new instance of the ContentDialog class.

public : ContentDialog()
public ContentDialog()
Public Sub New()
var contentDialog = new contentDialog();

Properties

CloseButtonCommand CloseButtonCommand CloseButtonCommand CloseButtonCommand

Gets or sets the command to invoke when the close button is tapped.

public : ICommand CloseButtonCommand { get; set; }
public ICommand CloseButtonCommand { get; set; }
Public ReadWrite Property CloseButtonCommand As ICommand
var iCommand = contentDialog.closeButtonCommand;
contentDialog.closeButtonCommand = iCommand;
<ContentDialog CloseButtonCommand="commandReference"/>

Value
ICommand ICommand ICommand ICommand

The command to invoke when the primary button is tapped.

Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)

CloseButtonCommandParameter CloseButtonCommandParameter CloseButtonCommandParameter CloseButtonCommandParameter

Gets or sets the parameter to pass to the command for the close button.

public : Platform::Object CloseButtonCommandParameter { get; set; }
public object CloseButtonCommandParameter { get; set; }
Public ReadWrite Property CloseButtonCommandParameter As object
var object = contentDialog.closeButtonCommandParameter;
contentDialog.closeButtonCommandParameter = object;
<ContentDialog>

  <ContentDialog.CloseButtonCommandParameter>

    object

  </ContentDialog.CloseButtonCommandParameter>

</ContentDialog>

Value
Platform::Object object object object

The parameter to pass to the command for the close button. The default is null.

Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)

CloseButtonCommandParameterProperty CloseButtonCommandParameterProperty CloseButtonCommandParameterProperty CloseButtonCommandParameterProperty

Gets the identifier of the CloseButtonCommandParameter dependency property.

public : static DependencyProperty CloseButtonCommandParameterProperty { get; }
public static DependencyProperty CloseButtonCommandParameterProperty { get; }
Public Static ReadOnly Property CloseButtonCommandParameterProperty As DependencyProperty
var dependencyProperty = Windows.UI.Xaml.Controls.ContentDialog.closeButtonCommandParameterProperty;
Value
DependencyProperty DependencyProperty DependencyProperty DependencyProperty

The identifier of the CloseButtonCommandParameter dependency property.

Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)

CloseButtonCommandProperty CloseButtonCommandProperty CloseButtonCommandProperty CloseButtonCommandProperty

Gets the identifier of the CloseButtonCommand dependency property.

public : static DependencyProperty CloseButtonCommandProperty { get; }
public static DependencyProperty CloseButtonCommandProperty { get; }
Public Static ReadOnly Property CloseButtonCommandProperty As DependencyProperty
var dependencyProperty = Windows.UI.Xaml.Controls.ContentDialog.closeButtonCommandProperty;
Value
DependencyProperty DependencyProperty DependencyProperty DependencyProperty

The identifier of the CloseButtonCommand dependency property.

Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)

CloseButtonStyle CloseButtonStyle CloseButtonStyle CloseButtonStyle

Gets or sets the Style to apply to the dialog's close button.

public : Style CloseButtonStyle { get; set; }
public Style CloseButtonStyle { get; set; }
Public ReadWrite Property CloseButtonStyle As Style
var style = contentDialog.closeButtonStyle;
contentDialog.closeButtonStyle = style;
<contentDialog CloseButtonStyle="{StaticResource styleResourceKey}"//>
Value
Style Style Style Style

The applied style for the button, if present; otherwise, null.

Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)

CloseButtonStyleProperty CloseButtonStyleProperty CloseButtonStyleProperty CloseButtonStyleProperty

Gets the identifier of the CloseButtonStyle dependency property.

public : static DependencyProperty CloseButtonStyleProperty { get; }
public static DependencyProperty CloseButtonStyleProperty { get; }
Public Static ReadOnly Property CloseButtonStyleProperty As DependencyProperty
var dependencyProperty = Windows.UI.Xaml.Controls.ContentDialog.closeButtonStyleProperty;
Value
DependencyProperty DependencyProperty DependencyProperty DependencyProperty

The identifier of the CloseButtonStyle dependency property.

Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)

CloseButtonText CloseButtonText CloseButtonText CloseButtonText

Gets or sets the text to display on the close button.

public : Platform::String CloseButtonText { get; set; }
public string CloseButtonText { get; set; }
Public ReadWrite Property CloseButtonText As string
var string = contentDialog.closeButtonText;
contentDialog.closeButtonText = string;
<ContentDialog CloseButtonText="string"/>

Value
Platform::String string string string

The text to display on the close button.

Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)

Remarks

Every dialog should contain a safe, nondestructive action button that enables the user to confidently exit the dialog.

Use the close button to create this button. This allows you to create the right user experience for all inputs including mouse, keyboard, touch, and gamepad. The dialog will close when:

  • The user clicks or taps on the close button
  • The user presses the system back button
  • The user presses the ESC button on keyboard
  • The user presses Gamepad B

Invoking the close button returns ContentDialogResult.None.

Version compatibility

The CloseButtonText property is not available prior to Windows 10, version 1703. If your app’s 'minimum platform version' setting in Microsoft Visual Studio is less than the 'introduced version' shown in the Requirements block later in this page, you should use the SecondaryButtonText property instead. For more info, see Version adaptive code.

To avoid exceptions when your app runs on previous versions of Windows 10, do not set this property in XAML or use it without performing a runtime check. This example shows how to use the ApiInformation class to check for the presence of this property before you set it.

<ContentDialog x:Name="contentDialog1" Loaded="ContentDialog_Loaded">

    ...

</ContentDialog>
private void ContentDialog_Loaded(object sender, RoutedEventArgs e)
{

    if (ApiInformation.IsPropertyPresent("Windows.UI.Xaml.Controls.ContentDialog", "CloseButtonText"))

    {

        contentDialog1.CloseButtonText = "Cancel";

    }

    else

    {

        contentDialog1.SecondaryButtonText = "Cancel";

    }

}

CloseButtonTextProperty CloseButtonTextProperty CloseButtonTextProperty CloseButtonTextProperty

Gets the identifier of the CloseButtonText dependency property.

public : static DependencyProperty CloseButtonTextProperty { get; }
public static DependencyProperty CloseButtonTextProperty { get; }
Public Static ReadOnly Property CloseButtonTextProperty As DependencyProperty
var dependencyProperty = Windows.UI.Xaml.Controls.ContentDialog.closeButtonTextProperty;
Value
DependencyProperty DependencyProperty DependencyProperty DependencyProperty

The identifier of the CloseButtonText dependency property.

Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)

DefaultButton DefaultButton DefaultButton DefaultButton

Gets or sets a value that indicates which button on the dialog is the default action.

public : ContentDialogButton DefaultButton { get; set; }
public ContentDialogButton DefaultButton { get; set; }
Public ReadWrite Property DefaultButton As ContentDialogButton
var contentDialogButton = contentDialog.defaultButton;
contentDialog.defaultButton = contentDialogButton;
Value
ContentDialogButton ContentDialogButton ContentDialogButton ContentDialogButton

A value of the enumeration. The default is None.

Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)

Remarks

You may optionally choose to differentiate one of the three buttons as the default button. Specifying the default button causes the following to happen:

  • The button receives the Accent Button visual treatment
  • The button will respond to the ENTER key automatically
    • When the user presses the ENTER key on the keyboard, the click handler associated with the default button will fire and the ContentDialogResult will return the value associated with the default button
    • If the user has placed focus on a control that handles ENTER, the default button will not respond to ENTER presses
  • The button will receive focus automatically when the dialog is opened unless the dialog’s content contains focusable UI

Version compatibility

The DefaultButton property is not available prior to Windows 10, version 1703. If your app’s 'minimum platform version' setting in Microsoft Visual Studio is less than the 'introduced version' shown in the Requirements block later in this page, you must design and test your app to account for this. For more info, see Version adaptive code.

To avoid exceptions when your app runs on previous versions of Windows 10, do not set this property in XAML or use it without performing a runtime check. This example shows how to use the ApiInformation class to check for the presence of this property before you set it.

<ContentDialog x:Name="contentDialog1" Loaded="ContentDialog_Loaded">
    ...
</ContentDialog>
private void ContentDialog_Loaded(object sender, RoutedEventArgs e)
{
    if (ApiInformation.IsPropertyPresent("Windows.UI.Xaml.Controls.ContentDialog", "DefaultButton"))
    {
        contentDialog1.DefaultButton = ContentDialogButton.Primary;
    }
}

DefaultButtonProperty DefaultButtonProperty DefaultButtonProperty DefaultButtonProperty

Gets the identifier of the DefaultButton dependency property.

public : static DependencyProperty DefaultButtonProperty { get; }
public static DependencyProperty DefaultButtonProperty { get; }
Public Static ReadOnly Property DefaultButtonProperty As DependencyProperty
var dependencyProperty = Windows.UI.Xaml.Controls.ContentDialog.defaultButtonProperty;
Value
DependencyProperty DependencyProperty DependencyProperty DependencyProperty

The identifier of the DefaultButton dependency property.

Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)

FullSizeDesired FullSizeDesired FullSizeDesired FullSizeDesired

Gets or sets a value that indicates whether a request is being made to display the dialog full screen.

public : Platform::Boolean FullSizeDesired { get; set; }
public bool FullSizeDesired { get; set; }
Public ReadWrite Property FullSizeDesired As bool
var bool = contentDialog.fullSizeDesired;
contentDialog.fullSizeDesired = bool;
<ContentDialog FullSizeDesired="bool"/>
Value
Platform::Boolean bool bool bool

true to request that the dialog is displayed full screen; otherwise, false. The default is false.

FullSizeDesiredProperty FullSizeDesiredProperty FullSizeDesiredProperty FullSizeDesiredProperty

Gets the identifier of the FullSizeDesired dependency property.

public : static DependencyProperty FullSizeDesiredProperty { get; }
public static DependencyProperty FullSizeDesiredProperty { get; }
Public Static ReadOnly Property FullSizeDesiredProperty As DependencyProperty
var dependencyProperty = Windows.UI.Xaml.Controls.ContentDialog.fullSizeDesiredProperty;
Value
DependencyProperty DependencyProperty DependencyProperty DependencyProperty

The identifier of the FullSizeDesired dependency property.

IsPrimaryButtonEnabled IsPrimaryButtonEnabled IsPrimaryButtonEnabled IsPrimaryButtonEnabled

Gets or sets whether the dialog's primary button is enabled.

public : Platform::Boolean IsPrimaryButtonEnabled { get; set; }
public bool IsPrimaryButtonEnabled { get; set; }
Public ReadWrite Property IsPrimaryButtonEnabled As bool
var bool = contentDialog.isPrimaryButtonEnabled;
contentDialog.isPrimaryButtonEnabled = bool;
<ContentDialog IsPrimaryButtonEnabled="bool"/>
Value
Platform::Boolean bool bool bool

True if the primary button of the dialog is enabled; Otherwise, false.

IsPrimaryButtonEnabledProperty IsPrimaryButtonEnabledProperty IsPrimaryButtonEnabledProperty IsPrimaryButtonEnabledProperty

Gets the identifier of the IsPrimaryButtonEnabled dependency property.

public : static DependencyProperty IsPrimaryButtonEnabledProperty { get; }
public static DependencyProperty IsPrimaryButtonEnabledProperty { get; }
Public Static ReadOnly Property IsPrimaryButtonEnabledProperty As DependencyProperty
var dependencyProperty = Windows.UI.Xaml.Controls.ContentDialog.isPrimaryButtonEnabledProperty;

IsSecondaryButtonEnabled IsSecondaryButtonEnabled IsSecondaryButtonEnabled IsSecondaryButtonEnabled

Gets or sets whether the dialog's secondary button is enabled.

public : Platform::Boolean IsSecondaryButtonEnabled { get; set; }
public bool IsSecondaryButtonEnabled { get; set; }
Public ReadWrite Property IsSecondaryButtonEnabled As bool
var bool = contentDialog.isSecondaryButtonEnabled;
contentDialog.isSecondaryButtonEnabled = bool;
<ContentDialog IsSecondaryButtonEnabled="bool"/>
Value
Platform::Boolean bool bool bool

True if the secondary button of the dialog is enabled; Otherwise, false.

IsSecondaryButtonEnabledProperty IsSecondaryButtonEnabledProperty IsSecondaryButtonEnabledProperty IsSecondaryButtonEnabledProperty

Gets the identifier of the IsSecondaryButtonEnabled dependency property.

public : static DependencyProperty IsSecondaryButtonEnabledProperty { get; }
public static DependencyProperty IsSecondaryButtonEnabledProperty { get; }
Public Static ReadOnly Property IsSecondaryButtonEnabledProperty As DependencyProperty
var dependencyProperty = Windows.UI.Xaml.Controls.ContentDialog.isSecondaryButtonEnabledProperty;

PrimaryButtonCommand PrimaryButtonCommand PrimaryButtonCommand PrimaryButtonCommand

Gets or sets the command to invoke when the primary button is tapped.

public : ICommand PrimaryButtonCommand { get; set; }
public ICommand PrimaryButtonCommand { get; set; }
Public ReadWrite Property PrimaryButtonCommand As ICommand
var iCommand = contentDialog.primaryButtonCommand;
contentDialog.primaryButtonCommand = iCommand;
<ContentDialog PrimaryButtonCommand="commandReference"/>
Value
ICommand ICommand ICommand ICommand

The command to invoke when the primary button is tapped.

PrimaryButtonCommandParameter PrimaryButtonCommandParameter PrimaryButtonCommandParameter PrimaryButtonCommandParameter

Gets or sets the parameter to pass to the command for the primary button.

public : Platform::Object PrimaryButtonCommandParameter { get; set; }
public object PrimaryButtonCommandParameter { get; set; }
Public ReadWrite Property PrimaryButtonCommandParameter As object
var object = contentDialog.primaryButtonCommandParameter;
contentDialog.primaryButtonCommandParameter = object;
<ContentDialog>
  <ContentDialog.PrimaryButtonCommandParameter>
    object
  </ContentDialog.PrimaryButtonCommandParameter>
</ContentDialog>
Value
Platform::Object object object object

The parameter to pass to the command for the primary button. The default is null.

PrimaryButtonCommandParameterProperty PrimaryButtonCommandParameterProperty PrimaryButtonCommandParameterProperty PrimaryButtonCommandParameterProperty

Gets the identifier of the PrimaryButtonCommandParameter dependency property.

public : static DependencyProperty PrimaryButtonCommandParameterProperty { get; }
public static DependencyProperty PrimaryButtonCommandParameterProperty { get; }
Public Static ReadOnly Property PrimaryButtonCommandParameterProperty As DependencyProperty
var dependencyProperty = Windows.UI.Xaml.Controls.ContentDialog.primaryButtonCommandParameterProperty;
Value
DependencyProperty DependencyProperty DependencyProperty DependencyProperty

The identifier of the PrimaryButtonCommandParameter dependency property

PrimaryButtonCommandProperty PrimaryButtonCommandProperty PrimaryButtonCommandProperty PrimaryButtonCommandProperty

Gets the identifier of the PrimaryButtonCommand dependency property.

public : static DependencyProperty PrimaryButtonCommandProperty { get; }
public static DependencyProperty PrimaryButtonCommandProperty { get; }
Public Static ReadOnly Property PrimaryButtonCommandProperty As DependencyProperty
var dependencyProperty = Windows.UI.Xaml.Controls.ContentDialog.primaryButtonCommandProperty;
Value
DependencyProperty DependencyProperty DependencyProperty DependencyProperty

The identifier of the PrimaryButtonCommand dependency property.

PrimaryButtonStyle PrimaryButtonStyle PrimaryButtonStyle PrimaryButtonStyle

Gets or sets the Style to apply to the dialog's primary button.

public : Style PrimaryButtonStyle { get; set; }
public Style PrimaryButtonStyle { get; set; }
Public ReadWrite Property PrimaryButtonStyle As Style
var style = contentDialog.primaryButtonStyle;
contentDialog.primaryButtonStyle = style;
<contentDialog CloseButtonStyle="{StaticResource styleResourceKey}"//>
Value
Style Style Style Style

The applied style for the button, if present; otherwise, null.

Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)

PrimaryButtonStyleProperty PrimaryButtonStyleProperty PrimaryButtonStyleProperty PrimaryButtonStyleProperty

Gets the identifier of the PrimaryButtonStyle dependency property.

public : static DependencyProperty PrimaryButtonStyleProperty { get; }
public static DependencyProperty PrimaryButtonStyleProperty { get; }
Public Static ReadOnly Property PrimaryButtonStyleProperty As DependencyProperty
var dependencyProperty = Windows.UI.Xaml.Controls.ContentDialog.primaryButtonStyleProperty;
Value
DependencyProperty DependencyProperty DependencyProperty DependencyProperty

The identifier of the PrimaryButtonStyle dependency property.

Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)

PrimaryButtonText PrimaryButtonText PrimaryButtonText PrimaryButtonText

Gets or sets the text to display on the primary button.

public : Platform::String PrimaryButtonText { get; set; }
public string PrimaryButtonText { get; set; }
Public ReadWrite Property PrimaryButtonText As string
var string = contentDialog.primaryButtonText;
contentDialog.primaryButtonText = string;
<ContentDialog PrimaryButtonText="string"/>
Value
Platform::String string string string

The text to display on the primary button. To hide this button, set the text to null or string.empty. The default is empty.

PrimaryButtonTextProperty PrimaryButtonTextProperty PrimaryButtonTextProperty PrimaryButtonTextProperty

Gets the identifier of the PrimaryButtonText dependency property.

public : static DependencyProperty PrimaryButtonTextProperty { get; }
public static DependencyProperty PrimaryButtonTextProperty { get; }
Public Static ReadOnly Property PrimaryButtonTextProperty As DependencyProperty
var dependencyProperty = Windows.UI.Xaml.Controls.ContentDialog.primaryButtonTextProperty;
Value
DependencyProperty DependencyProperty DependencyProperty DependencyProperty

The identifier of the PrimaryButtonText dependency property.

SecondaryButtonCommand SecondaryButtonCommand SecondaryButtonCommand SecondaryButtonCommand

Gets or sets the command to invoke when the secondary button is tapped.

public : ICommand SecondaryButtonCommand { get; set; }
public ICommand SecondaryButtonCommand { get; set; }
Public ReadWrite Property SecondaryButtonCommand As ICommand
var iCommand = contentDialog.secondaryButtonCommand;
contentDialog.secondaryButtonCommand = iCommand;
<ContentDialog SecondaryButtonCommand="commandReference"/>
Value
ICommand ICommand ICommand ICommand

The command to invoke when the secondary button is tapped.

SecondaryButtonCommandParameter SecondaryButtonCommandParameter SecondaryButtonCommandParameter SecondaryButtonCommandParameter

Gets or sets the parameter to pass to the command for the secondary button.

public : Platform::Object SecondaryButtonCommandParameter { get; set; }
public object SecondaryButtonCommandParameter { get; set; }
Public ReadWrite Property SecondaryButtonCommandParameter As object
var object = contentDialog.secondaryButtonCommandParameter;
contentDialog.secondaryButtonCommandParameter = object;
<ContentDialog>
  <ContentDialog.SecondaryButtonCommandParameter>
    object
  </ContentDialog.SecondaryButtonCommandParameter>
</ContentDialog>
Value
Platform::Object object object object

The command parameter for the secondary button. The default is null.

SecondaryButtonCommandParameterProperty SecondaryButtonCommandParameterProperty SecondaryButtonCommandParameterProperty SecondaryButtonCommandParameterProperty

Gets the identifier of the SecondaryButtonCommandParameter dependency property.

public : static DependencyProperty SecondaryButtonCommandParameterProperty { get; }
public static DependencyProperty SecondaryButtonCommandParameterProperty { get; }
Public Static ReadOnly Property SecondaryButtonCommandParameterProperty As DependencyProperty
var dependencyProperty = Windows.UI.Xaml.Controls.ContentDialog.secondaryButtonCommandParameterProperty;
Value
DependencyProperty DependencyProperty DependencyProperty DependencyProperty

The identifier of the SecondaryButtonCommandParameter dependency property.

SecondaryButtonCommandProperty SecondaryButtonCommandProperty SecondaryButtonCommandProperty SecondaryButtonCommandProperty

Gets the identifier of the SecondaryButtonCommand dependency property.

public : static DependencyProperty SecondaryButtonCommandProperty { get; }
public static DependencyProperty SecondaryButtonCommandProperty { get; }
Public Static ReadOnly Property SecondaryButtonCommandProperty As DependencyProperty
var dependencyProperty = Windows.UI.Xaml.Controls.ContentDialog.secondaryButtonCommandProperty;
Value
DependencyProperty DependencyProperty DependencyProperty DependencyProperty

The identifier of the SecondaryButtonCommand dependency property.

SecondaryButtonStyle SecondaryButtonStyle SecondaryButtonStyle SecondaryButtonStyle

Gets or sets the Style to apply to the dialog's secondary button.

public : Style SecondaryButtonStyle { get; set; }
public Style SecondaryButtonStyle { get; set; }
Public ReadWrite Property SecondaryButtonStyle As Style
var style = contentDialog.secondaryButtonStyle;
contentDialog.secondaryButtonStyle = style;
<contentDialog CloseButtonStyle="{StaticResource styleResourceKey}"//>
Value
Style Style Style Style

The applied style for the button, if present; otherwise, null.

Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)

SecondaryButtonStyleProperty SecondaryButtonStyleProperty SecondaryButtonStyleProperty SecondaryButtonStyleProperty

Gets the identifier of the SecondaryButtonStyle dependency property.

public : static DependencyProperty SecondaryButtonStyleProperty { get; }
public static DependencyProperty SecondaryButtonStyleProperty { get; }
Public Static ReadOnly Property SecondaryButtonStyleProperty As DependencyProperty
var dependencyProperty = Windows.UI.Xaml.Controls.ContentDialog.secondaryButtonStyleProperty;
Value
DependencyProperty DependencyProperty DependencyProperty DependencyProperty

The identifier of the SecondaryButtonStyle dependency property.

Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)

SecondaryButtonText SecondaryButtonText SecondaryButtonText SecondaryButtonText

Gets or sets the text to be displayed on the secondary button.

public : Platform::String SecondaryButtonText { get; set; }
public string SecondaryButtonText { get; set; }
Public ReadWrite Property SecondaryButtonText As string
var string = contentDialog.secondaryButtonText;
contentDialog.secondaryButtonText = string;
<ContentDialog SecondaryButtonText="string"/>
Value
Platform::String string string string

The text to be displayed on the secondary button. To hide this button, set the value to null or string.empty.

SecondaryButtonTextProperty SecondaryButtonTextProperty SecondaryButtonTextProperty SecondaryButtonTextProperty

Gets the identifier of the SecondaryButtonText dependency property.

public : static DependencyProperty SecondaryButtonTextProperty { get; }
public static DependencyProperty SecondaryButtonTextProperty { get; }
Public Static ReadOnly Property SecondaryButtonTextProperty As DependencyProperty
var dependencyProperty = Windows.UI.Xaml.Controls.ContentDialog.secondaryButtonTextProperty;
Value
DependencyProperty DependencyProperty DependencyProperty DependencyProperty

The identifier of the SecondaryButtonText dependency property.

Title Title Title Title

Gets or sets the title of the dialog.

public : Platform::Object Title { get; set; }
public object Title { get; set; }
Public ReadWrite Property Title As object
var object = contentDialog.title;
contentDialog.title = object;
<ContentDialog Title="string"/>

Value
Platform::Object object object object

The title of the dialog.

TitleProperty TitleProperty TitleProperty TitleProperty

Gets the identifier of the Title dependency property.

public : static DependencyProperty TitleProperty { get; }
public static DependencyProperty TitleProperty { get; }
Public Static ReadOnly Property TitleProperty As DependencyProperty
var dependencyProperty = Windows.UI.Xaml.Controls.ContentDialog.titleProperty;
Value
DependencyProperty DependencyProperty DependencyProperty DependencyProperty

The identifier of the Title dependency property.

TitleTemplate TitleTemplate TitleTemplate TitleTemplate

Gets or sets the title template.

public : DataTemplate TitleTemplate { get; set; }
public DataTemplate TitleTemplate { get; set; }
Public ReadWrite Property TitleTemplate As DataTemplate
var dataTemplate = contentDialog.titleTemplate;
contentDialog.titleTemplate = dataTemplate;
<ContentDialog>
  <ContentDialog.TitleTemplate>
    singleDataTemplate
  </ContentDialog.TitleTemplate>
</ContentDialog>

TitleTemplateProperty TitleTemplateProperty TitleTemplateProperty TitleTemplateProperty

Gets the identifier of the TitleTemplate dependency property.

public : static DependencyProperty TitleTemplateProperty { get; }
public static DependencyProperty TitleTemplateProperty { get; }
Public Static ReadOnly Property TitleTemplateProperty As DependencyProperty
var dependencyProperty = Windows.UI.Xaml.Controls.ContentDialog.titleTemplateProperty;
Value
DependencyProperty DependencyProperty DependencyProperty DependencyProperty

The identifier of the TitleTemplate dependency property.

AccessKey AccessKey AccessKey AccessKey

Inherited from UIElement

AccessKeyProperty AccessKeyProperty AccessKeyProperty AccessKeyProperty

Inherited from UIElement

AccessKeyScopeOwner AccessKeyScopeOwner AccessKeyScopeOwner AccessKeyScopeOwner

Inherited from UIElement

AccessKeyScopeOwnerProperty AccessKeyScopeOwnerProperty AccessKeyScopeOwnerProperty AccessKeyScopeOwnerProperty

Inherited from UIElement

ActualHeight ActualHeight ActualHeight ActualHeight

Inherited from FrameworkElement

ActualHeightProperty ActualHeightProperty ActualHeightProperty ActualHeightProperty

Inherited from FrameworkElement

ActualTheme ActualTheme ActualTheme ActualTheme

Inherited from FrameworkElement

ActualThemeProperty ActualThemeProperty ActualThemeProperty ActualThemeProperty

Inherited from FrameworkElement

ActualWidth ActualWidth ActualWidth ActualWidth

Inherited from FrameworkElement

ActualWidthProperty ActualWidthProperty ActualWidthProperty ActualWidthProperty

Inherited from FrameworkElement

AllowDrop AllowDrop AllowDrop AllowDrop

Inherited from UIElement

AllowDropProperty AllowDropProperty AllowDropProperty AllowDropProperty

Inherited from UIElement

AllowFocusOnInteraction AllowFocusOnInteraction AllowFocusOnInteraction AllowFocusOnInteraction

Inherited from FrameworkElement

AllowFocusOnInteractionProperty AllowFocusOnInteractionProperty AllowFocusOnInteractionProperty AllowFocusOnInteractionProperty

Inherited from FrameworkElement

AllowFocusWhenDisabled AllowFocusWhenDisabled AllowFocusWhenDisabled AllowFocusWhenDisabled

Inherited from FrameworkElement

AllowFocusWhenDisabledProperty AllowFocusWhenDisabledProperty AllowFocusWhenDisabledProperty AllowFocusWhenDisabledProperty

Inherited from FrameworkElement

Background Background Background Background

Inherited from Control

BackgroundProperty BackgroundProperty BackgroundProperty BackgroundProperty

Inherited from Control

BaseUri BaseUri BaseUri BaseUri

Inherited from FrameworkElement

BorderBrush BorderBrush BorderBrush BorderBrush

Inherited from Control

BorderBrushProperty BorderBrushProperty BorderBrushProperty BorderBrushProperty

Inherited from Control

BorderThickness BorderThickness BorderThickness BorderThickness

Inherited from Control

BorderThicknessProperty BorderThicknessProperty BorderThicknessProperty BorderThicknessProperty

Inherited from Control

CacheMode CacheMode CacheMode CacheMode

Inherited from UIElement

CacheModeProperty CacheModeProperty CacheModeProperty CacheModeProperty

Inherited from UIElement

CanDrag CanDrag CanDrag CanDrag

Inherited from UIElement

CanDragProperty CanDragProperty CanDragProperty CanDragProperty

Inherited from UIElement

CharacterReceivedEvent CharacterReceivedEvent CharacterReceivedEvent CharacterReceivedEvent

Inherited from UIElement

CharacterSpacing CharacterSpacing CharacterSpacing CharacterSpacing

Inherited from Control

CharacterSpacingProperty CharacterSpacingProperty CharacterSpacingProperty CharacterSpacingProperty

Inherited from Control

Clip Clip Clip Clip

Inherited from UIElement

ClipProperty ClipProperty ClipProperty ClipProperty

Inherited from UIElement

CompositeMode CompositeMode CompositeMode CompositeMode

Inherited from UIElement

CompositeModeProperty CompositeModeProperty CompositeModeProperty CompositeModeProperty

Inherited from UIElement

Content Content Content Content

Inherited from Windows.UI.Xaml.ControlsControl.Content

ContentProperty ContentProperty ContentProperty ContentProperty

Inherited from ContentControl

ContentTemplate ContentTemplate ContentTemplate ContentTemplate

Inherited from ContentControl

ContentTemplateProperty ContentTemplateProperty ContentTemplateProperty ContentTemplateProperty

Inherited from ContentControl

ContentTemplateRoot ContentTemplateRoot ContentTemplateRoot ContentTemplateRoot

Inherited from ContentControl

ContentTemplateSelector ContentTemplateSelector ContentTemplateSelector ContentTemplateSelector

Inherited from ContentControl

ContentTemplateSelectorProperty ContentTemplateSelectorProperty ContentTemplateSelectorProperty ContentTemplateSelectorProperty

Inherited from ContentControl

ContentTransitions ContentTransitions ContentTransitions ContentTransitions

Inherited from ContentControl

ContentTransitionsProperty ContentTransitionsProperty ContentTransitionsProperty ContentTransitionsProperty

Inherited from ContentControl

ContextFlyout ContextFlyout ContextFlyout ContextFlyout

Inherited from UIElement

ContextFlyoutProperty ContextFlyoutProperty ContextFlyoutProperty ContextFlyoutProperty

Inherited from UIElement

DataContext DataContext DataContext DataContext

Inherited from FrameworkElement

DataContextProperty DataContextProperty DataContextProperty DataContextProperty

Inherited from FrameworkElement

DefaultStyleKey DefaultStyleKey DefaultStyleKey DefaultStyleKey

Inherited from Control

DefaultStyleKeyProperty DefaultStyleKeyProperty DefaultStyleKeyProperty DefaultStyleKeyProperty

Inherited from Control

DefaultStyleResourceUri DefaultStyleResourceUri DefaultStyleResourceUri DefaultStyleResourceUri

Inherited from Control

DefaultStyleResourceUriProperty DefaultStyleResourceUriProperty DefaultStyleResourceUriProperty DefaultStyleResourceUriProperty

Inherited from Control

DesiredSize DesiredSize DesiredSize DesiredSize

Inherited from UIElement

Dispatcher Dispatcher Dispatcher Dispatcher

Inherited from DependencyObject

DoubleTappedEvent DoubleTappedEvent DoubleTappedEvent DoubleTappedEvent

Inherited from UIElement

DragEnterEvent DragEnterEvent DragEnterEvent DragEnterEvent

Inherited from UIElement

DragLeaveEvent DragLeaveEvent DragLeaveEvent DragLeaveEvent

Inherited from UIElement

DragOverEvent DragOverEvent DragOverEvent DragOverEvent

Inherited from UIElement

DropEvent DropEvent DropEvent DropEvent

Inherited from UIElement

ElementSoundMode ElementSoundMode ElementSoundMode ElementSoundMode

Inherited from Control

ElementSoundModeProperty ElementSoundModeProperty ElementSoundModeProperty ElementSoundModeProperty

Inherited from Control

ExitDisplayModeOnAccessKeyInvoked ExitDisplayModeOnAccessKeyInvoked ExitDisplayModeOnAccessKeyInvoked ExitDisplayModeOnAccessKeyInvoked

Inherited from UIElement

ExitDisplayModeOnAccessKeyInvokedProperty ExitDisplayModeOnAccessKeyInvokedProperty ExitDisplayModeOnAccessKeyInvokedProperty ExitDisplayModeOnAccessKeyInvokedProperty

Inherited from UIElement

FlowDirection FlowDirection FlowDirection FlowDirection

Inherited from FrameworkElement

FlowDirectionProperty FlowDirectionProperty FlowDirectionProperty FlowDirectionProperty

Inherited from FrameworkElement

FocusState FocusState FocusState FocusState

Inherited from Control

FocusStateProperty FocusStateProperty FocusStateProperty FocusStateProperty

Inherited from Control

FocusVisualMargin FocusVisualMargin FocusVisualMargin FocusVisualMargin

Inherited from FrameworkElement

FocusVisualMarginProperty FocusVisualMarginProperty FocusVisualMarginProperty FocusVisualMarginProperty

Inherited from FrameworkElement

FocusVisualPrimaryBrush FocusVisualPrimaryBrush FocusVisualPrimaryBrush FocusVisualPrimaryBrush

Inherited from FrameworkElement

FocusVisualPrimaryBrushProperty FocusVisualPrimaryBrushProperty FocusVisualPrimaryBrushProperty FocusVisualPrimaryBrushProperty

Inherited from FrameworkElement

FocusVisualPrimaryThickness FocusVisualPrimaryThickness FocusVisualPrimaryThickness FocusVisualPrimaryThickness

Inherited from FrameworkElement

FocusVisualPrimaryThicknessProperty FocusVisualPrimaryThicknessProperty FocusVisualPrimaryThicknessProperty FocusVisualPrimaryThicknessProperty

Inherited from FrameworkElement

FocusVisualSecondaryBrush FocusVisualSecondaryBrush FocusVisualSecondaryBrush FocusVisualSecondaryBrush

Inherited from FrameworkElement

FocusVisualSecondaryBrushProperty FocusVisualSecondaryBrushProperty FocusVisualSecondaryBrushProperty FocusVisualSecondaryBrushProperty

Inherited from FrameworkElement

FocusVisualSecondaryThickness FocusVisualSecondaryThickness FocusVisualSecondaryThickness FocusVisualSecondaryThickness

Inherited from FrameworkElement

FocusVisualSecondaryThicknessProperty FocusVisualSecondaryThicknessProperty FocusVisualSecondaryThicknessProperty FocusVisualSecondaryThicknessProperty

Inherited from FrameworkElement

FontFamily FontFamily FontFamily FontFamily

Inherited from Control

FontFamilyProperty FontFamilyProperty FontFamilyProperty FontFamilyProperty

Inherited from Control

FontSize FontSize FontSize FontSize

Inherited from Control

FontSizeProperty FontSizeProperty FontSizeProperty FontSizeProperty

Inherited from Control

FontStretch FontStretch FontStretch FontStretch

Inherited from Control

FontStretchProperty FontStretchProperty FontStretchProperty FontStretchProperty

Inherited from Control

FontStyle FontStyle FontStyle FontStyle

Inherited from Control

FontStyleProperty FontStyleProperty FontStyleProperty FontStyleProperty

Inherited from Control

FontWeight FontWeight FontWeight FontWeight

Inherited from Control

FontWeightProperty FontWeightProperty FontWeightProperty FontWeightProperty

Inherited from Control

Foreground Foreground Foreground Foreground

Inherited from Control

ForegroundProperty ForegroundProperty ForegroundProperty ForegroundProperty

Inherited from Control

GettingFocusEvent GettingFocusEvent GettingFocusEvent GettingFocusEvent

Inherited from UIElement

Height Height Height Height

Inherited from FrameworkElement

HeightProperty HeightProperty HeightProperty HeightProperty

Inherited from FrameworkElement

HighContrastAdjustment HighContrastAdjustment HighContrastAdjustment HighContrastAdjustment

Inherited from UIElement

HighContrastAdjustmentProperty HighContrastAdjustmentProperty HighContrastAdjustmentProperty HighContrastAdjustmentProperty

Inherited from UIElement

HoldingEvent HoldingEvent HoldingEvent HoldingEvent

Inherited from UIElement

HorizontalAlignment HorizontalAlignment HorizontalAlignment HorizontalAlignment

Inherited from FrameworkElement

HorizontalAlignmentProperty HorizontalAlignmentProperty HorizontalAlignmentProperty HorizontalAlignmentProperty

Inherited from FrameworkElement

HorizontalContentAlignment HorizontalContentAlignment HorizontalContentAlignment HorizontalContentAlignment

Inherited from Control

HorizontalContentAlignmentProperty HorizontalContentAlignmentProperty HorizontalContentAlignmentProperty HorizontalContentAlignmentProperty

Inherited from Control

IsAccessKeyScope IsAccessKeyScope IsAccessKeyScope IsAccessKeyScope

Inherited from UIElement

IsAccessKeyScopeProperty IsAccessKeyScopeProperty IsAccessKeyScopeProperty IsAccessKeyScopeProperty

Inherited from UIElement

IsDoubleTapEnabled IsDoubleTapEnabled IsDoubleTapEnabled IsDoubleTapEnabled

Inherited from UIElement

IsDoubleTapEnabledProperty IsDoubleTapEnabledProperty IsDoubleTapEnabledProperty IsDoubleTapEnabledProperty

Inherited from UIElement

IsEnabled IsEnabled IsEnabled IsEnabled

Inherited from Control

IsEnabledProperty IsEnabledProperty IsEnabledProperty IsEnabledProperty

Inherited from Control

IsFocusEngaged IsFocusEngaged IsFocusEngaged IsFocusEngaged

Inherited from Control

IsFocusEngagedProperty IsFocusEngagedProperty IsFocusEngagedProperty IsFocusEngagedProperty

Inherited from Control

IsFocusEngagementEnabled IsFocusEngagementEnabled IsFocusEngagementEnabled IsFocusEngagementEnabled

Inherited from Control

IsFocusEngagementEnabledProperty IsFocusEngagementEnabledProperty IsFocusEngagementEnabledProperty IsFocusEngagementEnabledProperty

Inherited from Control

IsHitTestVisible IsHitTestVisible IsHitTestVisible IsHitTestVisible

Inherited from UIElement

IsHitTestVisibleProperty IsHitTestVisibleProperty IsHitTestVisibleProperty IsHitTestVisibleProperty

Inherited from UIElement

IsHoldingEnabled IsHoldingEnabled IsHoldingEnabled IsHoldingEnabled

Inherited from UIElement

IsHoldingEnabledProperty IsHoldingEnabledProperty IsHoldingEnabledProperty IsHoldingEnabledProperty

Inherited from UIElement

IsRightTapEnabled IsRightTapEnabled IsRightTapEnabled IsRightTapEnabled

Inherited from UIElement

IsRightTapEnabledProperty IsRightTapEnabledProperty IsRightTapEnabledProperty IsRightTapEnabledProperty

Inherited from UIElement

IsTabStop IsTabStop IsTabStop IsTabStop

Inherited from Control

IsTabStopProperty IsTabStopProperty IsTabStopProperty IsTabStopProperty

Inherited from Control

IsTapEnabled IsTapEnabled IsTapEnabled IsTapEnabled

Inherited from UIElement

IsTapEnabledProperty IsTapEnabledProperty IsTapEnabledProperty IsTapEnabledProperty

Inherited from UIElement

IsTemplateFocusTargetProperty IsTemplateFocusTargetProperty IsTemplateFocusTargetProperty IsTemplateFocusTargetProperty

Inherited from Control

IsTemplateKeyTipTargetProperty IsTemplateKeyTipTargetProperty IsTemplateKeyTipTargetProperty IsTemplateKeyTipTargetProperty

Inherited from Control

IsTextScaleFactorEnabled IsTextScaleFactorEnabled IsTextScaleFactorEnabled IsTextScaleFactorEnabled

Inherited from Control

IsTextScaleFactorEnabledProperty IsTextScaleFactorEnabledProperty IsTextScaleFactorEnabledProperty IsTextScaleFactorEnabledProperty

Inherited from Control

KeyboardAccelerators KeyboardAccelerators KeyboardAccelerators KeyboardAccelerators

Inherited from UIElement

KeyDownEvent KeyDownEvent KeyDownEvent KeyDownEvent

Inherited from UIElement

KeyTipHorizontalOffset KeyTipHorizontalOffset KeyTipHorizontalOffset KeyTipHorizontalOffset

Inherited from UIElement

KeyTipHorizontalOffsetProperty KeyTipHorizontalOffsetProperty KeyTipHorizontalOffsetProperty KeyTipHorizontalOffsetProperty

Inherited from UIElement

KeyTipPlacementMode KeyTipPlacementMode KeyTipPlacementMode KeyTipPlacementMode

Inherited from UIElement

KeyTipPlacementModeProperty KeyTipPlacementModeProperty KeyTipPlacementModeProperty KeyTipPlacementModeProperty

Inherited from UIElement

KeyTipVerticalOffset KeyTipVerticalOffset KeyTipVerticalOffset KeyTipVerticalOffset

Inherited from UIElement

KeyTipVerticalOffsetProperty KeyTipVerticalOffsetProperty KeyTipVerticalOffsetProperty KeyTipVerticalOffsetProperty

Inherited from UIElement

KeyUpEvent KeyUpEvent KeyUpEvent KeyUpEvent

Inherited from UIElement

Language Language Language Language

Inherited from FrameworkElement

LanguageProperty LanguageProperty LanguageProperty LanguageProperty

Inherited from FrameworkElement

Lights Lights Lights Lights

Inherited from UIElement

LightsProperty LightsProperty LightsProperty LightsProperty

Inherited from UIElement

LosingFocusEvent LosingFocusEvent LosingFocusEvent LosingFocusEvent

Inherited from UIElement

ManipulationCompletedEvent ManipulationCompletedEvent ManipulationCompletedEvent ManipulationCompletedEvent

Inherited from UIElement

ManipulationDeltaEvent ManipulationDeltaEvent ManipulationDeltaEvent ManipulationDeltaEvent

Inherited from UIElement

ManipulationInertiaStartingEvent ManipulationInertiaStartingEvent ManipulationInertiaStartingEvent ManipulationInertiaStartingEvent

Inherited from UIElement

ManipulationMode ManipulationMode ManipulationMode ManipulationMode

Inherited from UIElement

ManipulationModeProperty ManipulationModeProperty ManipulationModeProperty ManipulationModeProperty

Inherited from UIElement

ManipulationStartedEvent ManipulationStartedEvent ManipulationStartedEvent ManipulationStartedEvent

Inherited from UIElement

ManipulationStartingEvent ManipulationStartingEvent ManipulationStartingEvent ManipulationStartingEvent

Inherited from UIElement

Margin Margin Margin Margin

Inherited from FrameworkElement

MarginProperty MarginProperty MarginProperty MarginProperty

Inherited from FrameworkElement

MaxHeight MaxHeight MaxHeight MaxHeight

Inherited from FrameworkElement

MaxHeightProperty MaxHeightProperty MaxHeightProperty MaxHeightProperty

Inherited from FrameworkElement

MaxWidth MaxWidth MaxWidth MaxWidth

Inherited from FrameworkElement

MaxWidthProperty MaxWidthProperty MaxWidthProperty MaxWidthProperty

Inherited from FrameworkElement

MinHeight MinHeight MinHeight MinHeight

Inherited from FrameworkElement

MinHeightProperty MinHeightProperty MinHeightProperty MinHeightProperty

Inherited from FrameworkElement

MinWidth MinWidth MinWidth MinWidth

Inherited from FrameworkElement

MinWidthProperty MinWidthProperty MinWidthProperty MinWidthProperty

Inherited from FrameworkElement

Name Name Name Name

Inherited from FrameworkElement

NameProperty NameProperty NameProperty NameProperty

Inherited from FrameworkElement

NoFocusCandidateFoundEvent NoFocusCandidateFoundEvent NoFocusCandidateFoundEvent NoFocusCandidateFoundEvent

Inherited from UIElement

Opacity Opacity Opacity Opacity

Inherited from UIElement

OpacityProperty OpacityProperty OpacityProperty OpacityProperty

Inherited from UIElement

Padding Padding Padding Padding

Inherited from Control

PaddingProperty PaddingProperty PaddingProperty PaddingProperty

Inherited from Control

Parent Parent Parent Parent

Inherited from FrameworkElement

PointerCanceledEvent PointerCanceledEvent PointerCanceledEvent PointerCanceledEvent

Inherited from UIElement

PointerCaptureLostEvent PointerCaptureLostEvent PointerCaptureLostEvent PointerCaptureLostEvent

Inherited from UIElement

PointerCaptures PointerCaptures PointerCaptures PointerCaptures

Inherited from UIElement

PointerCapturesProperty PointerCapturesProperty PointerCapturesProperty PointerCapturesProperty

Inherited from UIElement

PointerEnteredEvent PointerEnteredEvent PointerEnteredEvent PointerEnteredEvent

Inherited from UIElement

PointerExitedEvent PointerExitedEvent PointerExitedEvent PointerExitedEvent

Inherited from UIElement

PointerMovedEvent PointerMovedEvent PointerMovedEvent PointerMovedEvent

Inherited from UIElement

PointerPressedEvent PointerPressedEvent PointerPressedEvent PointerPressedEvent

Inherited from UIElement

PointerReleasedEvent PointerReleasedEvent PointerReleasedEvent PointerReleasedEvent

Inherited from UIElement

PointerWheelChangedEvent PointerWheelChangedEvent PointerWheelChangedEvent PointerWheelChangedEvent

Inherited from UIElement

PreviewKeyDownEvent PreviewKeyDownEvent PreviewKeyDownEvent PreviewKeyDownEvent

Inherited from UIElement

PreviewKeyUpEvent PreviewKeyUpEvent PreviewKeyUpEvent PreviewKeyUpEvent

Inherited from UIElement

Projection Projection Projection Projection

Inherited from UIElement

ProjectionProperty ProjectionProperty ProjectionProperty ProjectionProperty

Inherited from UIElement

RenderSize RenderSize RenderSize RenderSize

Inherited from UIElement

RenderTransform RenderTransform RenderTransform RenderTransform

Inherited from UIElement

RenderTransformOrigin RenderTransformOrigin RenderTransformOrigin RenderTransformOrigin

Inherited from UIElement

RenderTransformOriginProperty RenderTransformOriginProperty RenderTransformOriginProperty RenderTransformOriginProperty

Inherited from UIElement

RenderTransformProperty RenderTransformProperty RenderTransformProperty RenderTransformProperty

Inherited from UIElement

RequestedTheme RequestedTheme RequestedTheme RequestedTheme

Inherited from FrameworkElement

RequestedThemeProperty RequestedThemeProperty RequestedThemeProperty RequestedThemeProperty

Inherited from FrameworkElement

RequiresPointer RequiresPointer RequiresPointer RequiresPointer

Inherited from Control

RequiresPointerProperty RequiresPointerProperty RequiresPointerProperty RequiresPointerProperty

Inherited from Control

Resources Resources Resources Resources

Inherited from FrameworkElement

RightTappedEvent RightTappedEvent RightTappedEvent RightTappedEvent

Inherited from UIElement

Style Style Style Style

Inherited from FrameworkElement

StyleProperty StyleProperty StyleProperty StyleProperty

Inherited from FrameworkElement

TabFocusNavigation TabFocusNavigation TabFocusNavigation TabFocusNavigation

Inherited from UIElement

TabFocusNavigationProperty TabFocusNavigationProperty TabFocusNavigationProperty TabFocusNavigationProperty

Inherited from UIElement

TabIndex TabIndex TabIndex TabIndex

Inherited from Control

TabIndexProperty TabIndexProperty TabIndexProperty TabIndexProperty

Inherited from Control

TabNavigation TabNavigation TabNavigation TabNavigation

Inherited from Control

TabNavigationProperty TabNavigationProperty TabNavigationProperty TabNavigationProperty

Inherited from Control

Tag Tag Tag Tag

Inherited from FrameworkElement

TagProperty TagProperty TagProperty TagProperty

Inherited from FrameworkElement

TappedEvent TappedEvent TappedEvent TappedEvent

Inherited from UIElement

Template Template Template Template

Inherited from Control

TemplateProperty TemplateProperty TemplateProperty TemplateProperty

Inherited from Control

Transform3D Transform3D Transform3D Transform3D

Inherited from UIElement

Transform3DProperty Transform3DProperty Transform3DProperty Transform3DProperty

Inherited from UIElement

Transitions Transitions Transitions Transitions

Inherited from UIElement

TransitionsProperty TransitionsProperty TransitionsProperty TransitionsProperty

Inherited from UIElement

Triggers Triggers Triggers Triggers

Inherited from FrameworkElement

UseLayoutRounding UseLayoutRounding UseLayoutRounding UseLayoutRounding

Inherited from UIElement

UseLayoutRoundingProperty UseLayoutRoundingProperty UseLayoutRoundingProperty UseLayoutRoundingProperty

Inherited from UIElement

UseSystemFocusVisuals UseSystemFocusVisuals UseSystemFocusVisuals UseSystemFocusVisuals

Inherited from Control

UseSystemFocusVisualsProperty UseSystemFocusVisualsProperty UseSystemFocusVisualsProperty UseSystemFocusVisualsProperty

Inherited from Control

VerticalAlignment VerticalAlignment VerticalAlignment VerticalAlignment

Inherited from FrameworkElement

VerticalAlignmentProperty VerticalAlignmentProperty VerticalAlignmentProperty VerticalAlignmentProperty

Inherited from FrameworkElement

VerticalContentAlignment VerticalContentAlignment VerticalContentAlignment VerticalContentAlignment

Inherited from Control

VerticalContentAlignmentProperty VerticalContentAlignmentProperty VerticalContentAlignmentProperty VerticalContentAlignmentProperty

Inherited from Control

Visibility Visibility Visibility Visibility

Inherited from UIElement

VisibilityProperty VisibilityProperty VisibilityProperty VisibilityProperty

Inherited from UIElement

Width Width Width Width

Inherited from FrameworkElement

WidthProperty WidthProperty WidthProperty WidthProperty

Inherited from FrameworkElement

XYFocusDown XYFocusDown XYFocusDown XYFocusDown

Inherited from Control

XYFocusDownNavigationStrategy XYFocusDownNavigationStrategy XYFocusDownNavigationStrategy XYFocusDownNavigationStrategy

Inherited from UIElement

XYFocusDownNavigationStrategyProperty XYFocusDownNavigationStrategyProperty XYFocusDownNavigationStrategyProperty XYFocusDownNavigationStrategyProperty

Inherited from UIElement

XYFocusDownProperty XYFocusDownProperty XYFocusDownProperty XYFocusDownProperty

Inherited from Control

XYFocusKeyboardNavigation XYFocusKeyboardNavigation XYFocusKeyboardNavigation XYFocusKeyboardNavigation

Inherited from UIElement

XYFocusKeyboardNavigationProperty XYFocusKeyboardNavigationProperty XYFocusKeyboardNavigationProperty XYFocusKeyboardNavigationProperty

Inherited from UIElement

XYFocusLeft XYFocusLeft XYFocusLeft XYFocusLeft

Inherited from Control

XYFocusLeftNavigationStrategy XYFocusLeftNavigationStrategy XYFocusLeftNavigationStrategy XYFocusLeftNavigationStrategy

Inherited from UIElement

XYFocusLeftNavigationStrategyProperty XYFocusLeftNavigationStrategyProperty XYFocusLeftNavigationStrategyProperty XYFocusLeftNavigationStrategyProperty

Inherited from UIElement

XYFocusLeftProperty XYFocusLeftProperty XYFocusLeftProperty XYFocusLeftProperty

Inherited from Control

XYFocusRight XYFocusRight XYFocusRight XYFocusRight

Inherited from Control

XYFocusRightNavigationStrategy XYFocusRightNavigationStrategy XYFocusRightNavigationStrategy XYFocusRightNavigationStrategy

Inherited from UIElement

XYFocusRightNavigationStrategyProperty XYFocusRightNavigationStrategyProperty XYFocusRightNavigationStrategyProperty XYFocusRightNavigationStrategyProperty

Inherited from UIElement

XYFocusRightProperty XYFocusRightProperty XYFocusRightProperty XYFocusRightProperty

Inherited from Control

XYFocusUp XYFocusUp XYFocusUp XYFocusUp

Inherited from Control

XYFocusUpNavigationStrategy XYFocusUpNavigationStrategy XYFocusUpNavigationStrategy XYFocusUpNavigationStrategy

Inherited from UIElement

XYFocusUpNavigationStrategyProperty XYFocusUpNavigationStrategyProperty XYFocusUpNavigationStrategyProperty XYFocusUpNavigationStrategyProperty

Inherited from UIElement

XYFocusUpProperty XYFocusUpProperty XYFocusUpProperty XYFocusUpProperty

Inherited from Control

Methods

Hide() Hide() Hide() Hide()

Hides the dialog.

public : void Hide()
public void Hide()
Public Function Hide() As void
contentDialog.hide();

ShowAsync() ShowAsync() ShowAsync() ShowAsync()

Begins an asynchronous operation to show the dialog.

public : IAsyncOperation<ContentDialogResult> ShowAsync()
public IAsyncOperation<ContentDialogResult> ShowAsync()
Public Function ShowAsync() As IAsyncOperation( Of ContentDialogResult )
var iAsyncOperation = contentDialog.showAsync();
Returns

ShowAsync(ContentDialogPlacement) ShowAsync(ContentDialogPlacement) ShowAsync(ContentDialogPlacement) ShowAsync(ContentDialogPlacement)

Begins an asynchronous operation to show the dialog with the specified placement.

public : IAsyncOperation<ContentDialogResult> ShowAsync(ContentDialogPlacement placement)
public IAsyncOperation<ContentDialogResult> ShowAsync(ContentDialogPlacement placement)
Public Function ShowAsync(placement As ContentDialogPlacement) As IAsyncOperation( Of ContentDialogResult )
var iAsyncOperation = contentDialog.showAsync(placement);
Parameters
placement
ContentDialogPlacement ContentDialogPlacement ContentDialogPlacement ContentDialogPlacement

A value that specifies whether the dialog is placed in the PopupRoot or in its parent's visual tree.

Returns
Additional features and requirements
Device family
Windows 10 Fall Creators Update (introduced v10.0.16299.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v5)

Remarks

When you call this method with the ContentDialogPlacement.Popup parameter value, the dialog is rooted in the PopupRoot element of the XAML Window. This is the default behavior, and is equivilent to calling the ShowAsync method with no parameters.

When you call this method with the ContentDialogPlacement.InPlace parameter value:

  • If the dialog has a parent element, the dialog is rooted in the parent's visual tree. It's shown inline along with the parent’s other child elements, and participates in the parent container’s layout.
  • If the dialog has no parent, the dialog falls back to the default behavior and is shown in the PopupRoot.

AddHandler(RoutedEvent,Object,Boolean) AddHandler(RoutedEvent,Object,Boolean) AddHandler(RoutedEvent,Object,Boolean) AddHandler(RoutedEvent,Object,Boolean)

Inherited from UIElement

ApplyTemplate ApplyTemplate ApplyTemplate ApplyTemplate

Inherited from Control

Arrange(Rect) Arrange(Rect) Arrange(Rect) Arrange(Rect)

Inherited from UIElement

ArrangeOverride(Size) ArrangeOverride(Size) ArrangeOverride(Size) ArrangeOverride(Size)

Inherited from FrameworkElement

CancelDirectManipulations CancelDirectManipulations CancelDirectManipulations CancelDirectManipulations

Inherited from UIElement

CapturePointer(Pointer) CapturePointer(Pointer) CapturePointer(Pointer) CapturePointer(Pointer)

Inherited from UIElement

ClearValue(DependencyProperty) ClearValue(DependencyProperty) ClearValue(DependencyProperty) ClearValue(DependencyProperty)

Inherited from DependencyObject

DeferTree(DependencyObject) DeferTree(DependencyObject) DeferTree(DependencyObject) DeferTree(DependencyObject)

Inherited from FrameworkElement

FindName(String) FindName(String) FindName(String) FindName(String)

Inherited from FrameworkElement

FindSubElementsForTouchTargeting(Point,Rect) FindSubElementsForTouchTargeting(Point,Rect) FindSubElementsForTouchTargeting(Point,Rect) FindSubElementsForTouchTargeting(Point,Rect)

Inherited from UIElement

Focus(FocusState) Focus(FocusState) Focus(FocusState) Focus(FocusState)

Inherited from Control

GetAnimationBaseValue(DependencyProperty) GetAnimationBaseValue(DependencyProperty) GetAnimationBaseValue(DependencyProperty) GetAnimationBaseValue(DependencyProperty)

Inherited from DependencyObject

GetBindingExpression(DependencyProperty) GetBindingExpression(DependencyProperty) GetBindingExpression(DependencyProperty) GetBindingExpression(DependencyProperty)

Inherited from FrameworkElement

GetChildrenInTabFocusOrder GetChildrenInTabFocusOrder GetChildrenInTabFocusOrder GetChildrenInTabFocusOrder

Inherited from UIElement

GetIsTemplateFocusTarget(FrameworkElement) GetIsTemplateFocusTarget(FrameworkElement) GetIsTemplateFocusTarget(FrameworkElement) GetIsTemplateFocusTarget(FrameworkElement)

Inherited from Control

GetIsTemplateKeyTipTarget(DependencyObject) GetIsTemplateKeyTipTarget(DependencyObject) GetIsTemplateKeyTipTarget(DependencyObject) GetIsTemplateKeyTipTarget(DependencyObject)

Inherited from Control

GetTemplateChild(String) GetTemplateChild(String) GetTemplateChild(String) GetTemplateChild(String)

Inherited from Control

GetValue(DependencyProperty) GetValue(DependencyProperty) GetValue(DependencyProperty) GetValue(DependencyProperty)

Inherited from DependencyObject

GoToElementStateCore(String,Boolean) GoToElementStateCore(String,Boolean) GoToElementStateCore(String,Boolean) GoToElementStateCore(String,Boolean)

Inherited from FrameworkElement

InvalidateArrange InvalidateArrange InvalidateArrange InvalidateArrange

Inherited from UIElement

InvalidateMeasure InvalidateMeasure InvalidateMeasure InvalidateMeasure

Inherited from UIElement

Measure(Size) Measure(Size) Measure(Size) Measure(Size)

Inherited from UIElement

MeasureOverride(Size) MeasureOverride(Size) MeasureOverride(Size) MeasureOverride(Size)

Inherited from FrameworkElement

OnApplyTemplate OnApplyTemplate OnApplyTemplate OnApplyTemplate

Inherited from FrameworkElement

OnCharacterReceived(CharacterReceivedRoutedEventArgs) OnCharacterReceived(CharacterReceivedRoutedEventArgs) OnCharacterReceived(CharacterReceivedRoutedEventArgs) OnCharacterReceived(CharacterReceivedRoutedEventArgs)

Inherited from Control

OnContentChanged(Object,Object) OnContentChanged(Object,Object) OnContentChanged(Object,Object) OnContentChanged(Object,Object)

Inherited from ContentControl

OnContentTemplateChanged(DataTemplate,DataTemplate) OnContentTemplateChanged(DataTemplate,DataTemplate) OnContentTemplateChanged(DataTemplate,DataTemplate) OnContentTemplateChanged(DataTemplate,DataTemplate)

Inherited from ContentControl

OnContentTemplateSelectorChanged(DataTemplateSelector,DataTemplateSelector) OnContentTemplateSelectorChanged(DataTemplateSelector,DataTemplateSelector) OnContentTemplateSelectorChanged(DataTemplateSelector,DataTemplateSelector) OnContentTemplateSelectorChanged(DataTemplateSelector,DataTemplateSelector)

Inherited from ContentControl

OnCreateAutomationPeer OnCreateAutomationPeer OnCreateAutomationPeer OnCreateAutomationPeer

Inherited from UIElement

OnDisconnectVisualChildren OnDisconnectVisualChildren OnDisconnectVisualChildren OnDisconnectVisualChildren

Inherited from UIElement

OnDoubleTapped(DoubleTappedRoutedEventArgs) OnDoubleTapped(DoubleTappedRoutedEventArgs) OnDoubleTapped(DoubleTappedRoutedEventArgs) OnDoubleTapped(DoubleTappedRoutedEventArgs)

Inherited from Control

OnDragEnter(DragEventArgs) OnDragEnter(DragEventArgs) OnDragEnter(DragEventArgs) OnDragEnter(DragEventArgs)

Inherited from Control

OnDragLeave(DragEventArgs) OnDragLeave(DragEventArgs) OnDragLeave(DragEventArgs) OnDragLeave(DragEventArgs)

Inherited from Control

OnDragOver(DragEventArgs) OnDragOver(DragEventArgs) OnDragOver(DragEventArgs) OnDragOver(DragEventArgs)

Inherited from Control

OnDrop(DragEventArgs) OnDrop(DragEventArgs) OnDrop(DragEventArgs) OnDrop(DragEventArgs)

Inherited from Control

OnGotFocus(RoutedEventArgs) OnGotFocus(RoutedEventArgs) OnGotFocus(RoutedEventArgs) OnGotFocus(RoutedEventArgs)

Inherited from Control

OnHolding(HoldingRoutedEventArgs) OnHolding(HoldingRoutedEventArgs) OnHolding(HoldingRoutedEventArgs) OnHolding(HoldingRoutedEventArgs)

Inherited from Control

OnKeyDown(KeyRoutedEventArgs) OnKeyDown(KeyRoutedEventArgs) OnKeyDown(KeyRoutedEventArgs) OnKeyDown(KeyRoutedEventArgs)

Inherited from Control

OnKeyUp(KeyRoutedEventArgs) OnKeyUp(KeyRoutedEventArgs) OnKeyUp(KeyRoutedEventArgs) OnKeyUp(KeyRoutedEventArgs)

Inherited from Control

OnLostFocus(RoutedEventArgs) OnLostFocus(RoutedEventArgs) OnLostFocus(RoutedEventArgs) OnLostFocus(RoutedEventArgs)

Inherited from Control

OnManipulationCompleted(ManipulationCompletedRoutedEventArgs) OnManipulationCompleted(ManipulationCompletedRoutedEventArgs) OnManipulationCompleted(ManipulationCompletedRoutedEventArgs) OnManipulationCompleted(ManipulationCompletedRoutedEventArgs)

Inherited from Control

OnManipulationDelta(ManipulationDeltaRoutedEventArgs) OnManipulationDelta(ManipulationDeltaRoutedEventArgs) OnManipulationDelta(ManipulationDeltaRoutedEventArgs) OnManipulationDelta(ManipulationDeltaRoutedEventArgs)

Inherited from Control

OnManipulationInertiaStarting(ManipulationInertiaStartingRoutedEventArgs) OnManipulationInertiaStarting(ManipulationInertiaStartingRoutedEventArgs) OnManipulationInertiaStarting(ManipulationInertiaStartingRoutedEventArgs) OnManipulationInertiaStarting(ManipulationInertiaStartingRoutedEventArgs)

Inherited from Control

OnManipulationStarted(ManipulationStartedRoutedEventArgs) OnManipulationStarted(ManipulationStartedRoutedEventArgs) OnManipulationStarted(ManipulationStartedRoutedEventArgs) OnManipulationStarted(ManipulationStartedRoutedEventArgs)

Inherited from Control

OnManipulationStarting(ManipulationStartingRoutedEventArgs) OnManipulationStarting(ManipulationStartingRoutedEventArgs) OnManipulationStarting(ManipulationStartingRoutedEventArgs) OnManipulationStarting(ManipulationStartingRoutedEventArgs)

Inherited from Control

OnPointerCanceled(PointerRoutedEventArgs) OnPointerCanceled(PointerRoutedEventArgs) OnPointerCanceled(PointerRoutedEventArgs) OnPointerCanceled(PointerRoutedEventArgs)

Inherited from Control

OnPointerCaptureLost(PointerRoutedEventArgs) OnPointerCaptureLost(PointerRoutedEventArgs) OnPointerCaptureLost(PointerRoutedEventArgs) OnPointerCaptureLost(PointerRoutedEventArgs)

Inherited from Control

OnPointerEntered(PointerRoutedEventArgs) OnPointerEntered(PointerRoutedEventArgs) OnPointerEntered(PointerRoutedEventArgs) OnPointerEntered(PointerRoutedEventArgs)

Inherited from Control

OnPointerExited(PointerRoutedEventArgs) OnPointerExited(PointerRoutedEventArgs) OnPointerExited(PointerRoutedEventArgs) OnPointerExited(PointerRoutedEventArgs)

Inherited from Control

OnPointerMoved(PointerRoutedEventArgs) OnPointerMoved(PointerRoutedEventArgs) OnPointerMoved(PointerRoutedEventArgs) OnPointerMoved(PointerRoutedEventArgs)

Inherited from Control

OnPointerPressed(PointerRoutedEventArgs) OnPointerPressed(PointerRoutedEventArgs) OnPointerPressed(PointerRoutedEventArgs) OnPointerPressed(PointerRoutedEventArgs)

Inherited from Control

OnPointerReleased(PointerRoutedEventArgs) OnPointerReleased(PointerRoutedEventArgs) OnPointerReleased(PointerRoutedEventArgs) OnPointerReleased(PointerRoutedEventArgs)

Inherited from Control

OnPointerWheelChanged(PointerRoutedEventArgs) OnPointerWheelChanged(PointerRoutedEventArgs) OnPointerWheelChanged(PointerRoutedEventArgs) OnPointerWheelChanged(PointerRoutedEventArgs)

Inherited from Control

OnPreviewKeyDown(KeyRoutedEventArgs) OnPreviewKeyDown(KeyRoutedEventArgs) OnPreviewKeyDown(KeyRoutedEventArgs) OnPreviewKeyDown(KeyRoutedEventArgs)

Inherited from Control

OnPreviewKeyUp(KeyRoutedEventArgs) OnPreviewKeyUp(KeyRoutedEventArgs) OnPreviewKeyUp(KeyRoutedEventArgs) OnPreviewKeyUp(KeyRoutedEventArgs)

Inherited from Control

OnProcessKeyboardAccelerators(ProcessKeyboardAcceleratorEventArgs) OnProcessKeyboardAccelerators(ProcessKeyboardAcceleratorEventArgs) OnProcessKeyboardAccelerators(ProcessKeyboardAcceleratorEventArgs) OnProcessKeyboardAccelerators(ProcessKeyboardAcceleratorEventArgs)

Inherited from UIElement

OnRightTapped(RightTappedRoutedEventArgs) OnRightTapped(RightTappedRoutedEventArgs) OnRightTapped(RightTappedRoutedEventArgs) OnRightTapped(RightTappedRoutedEventArgs)

Inherited from Control

OnTapped(TappedRoutedEventArgs) OnTapped(TappedRoutedEventArgs) OnTapped(TappedRoutedEventArgs) OnTapped(TappedRoutedEventArgs)

Inherited from Control

ReadLocalValue(DependencyProperty) ReadLocalValue(DependencyProperty) ReadLocalValue(DependencyProperty) ReadLocalValue(DependencyProperty)

Inherited from DependencyObject

RegisterPropertyChangedCallback(DependencyProperty,DependencyPropertyChangedCallback) RegisterPropertyChangedCallback(DependencyProperty,DependencyPropertyChangedCallback) RegisterPropertyChangedCallback(DependencyProperty,DependencyPropertyChangedCallback) RegisterPropertyChangedCallback(DependencyProperty,DependencyPropertyChangedCallback)

Inherited from DependencyObject

ReleasePointerCapture(Pointer) ReleasePointerCapture(Pointer) ReleasePointerCapture(Pointer) ReleasePointerCapture(Pointer)

Inherited from UIElement

ReleasePointerCaptures ReleasePointerCaptures ReleasePointerCaptures ReleasePointerCaptures

Inherited from UIElement

RemoveFocusEngagement RemoveFocusEngagement RemoveFocusEngagement RemoveFocusEngagement

Inherited from Control

RemoveHandler(RoutedEvent,Object) RemoveHandler(RoutedEvent,Object) RemoveHandler(RoutedEvent,Object) RemoveHandler(RoutedEvent,Object)

Inherited from UIElement

SetBinding(DependencyProperty,BindingBase) SetBinding(DependencyProperty,BindingBase) SetBinding(DependencyProperty,BindingBase) SetBinding(DependencyProperty,BindingBase)

Inherited from FrameworkElement

SetIsTemplateFocusTarget(FrameworkElement,Boolean) SetIsTemplateFocusTarget(FrameworkElement,Boolean) SetIsTemplateFocusTarget(FrameworkElement,Boolean) SetIsTemplateFocusTarget(FrameworkElement,Boolean)

Inherited from Control

SetIsTemplateKeyTipTarget(DependencyObject,Boolean) SetIsTemplateKeyTipTarget(DependencyObject,Boolean) SetIsTemplateKeyTipTarget(DependencyObject,Boolean) SetIsTemplateKeyTipTarget(DependencyObject,Boolean)

Inherited from Control

SetValue(DependencyProperty,Object) SetValue(DependencyProperty,Object) SetValue(DependencyProperty,Object) SetValue(DependencyProperty,Object)

Inherited from DependencyObject

StartBringIntoView StartBringIntoView StartBringIntoView StartBringIntoView

Inherited from UIElement

StartBringIntoView(BringIntoViewOptions) StartBringIntoView(BringIntoViewOptions) StartBringIntoView(BringIntoViewOptions) StartBringIntoView(BringIntoViewOptions)

Inherited from UIElement

StartDragAsync(PointerPoint) StartDragAsync(PointerPoint) StartDragAsync(PointerPoint) StartDragAsync(PointerPoint)

Inherited from UIElement

TransformToVisual(UIElement) TransformToVisual(UIElement) TransformToVisual(UIElement) TransformToVisual(UIElement)

Inherited from UIElement

TryInvokeKeyboardAccelerator(ProcessKeyboardAcceleratorEventArgs) TryInvokeKeyboardAccelerator(ProcessKeyboardAcceleratorEventArgs) TryInvokeKeyboardAccelerator(ProcessKeyboardAcceleratorEventArgs) TryInvokeKeyboardAccelerator(ProcessKeyboardAcceleratorEventArgs)

Inherited from UIElement

TryStartDirectManipulation(Pointer) TryStartDirectManipulation(Pointer) TryStartDirectManipulation(Pointer) TryStartDirectManipulation(Pointer)

Inherited from UIElement

UnregisterPropertyChangedCallback(DependencyProperty,Int64) UnregisterPropertyChangedCallback(DependencyProperty,Int64) UnregisterPropertyChangedCallback(DependencyProperty,Int64) UnregisterPropertyChangedCallback(DependencyProperty,Int64)

Inherited from DependencyObject

UpdateLayout UpdateLayout UpdateLayout UpdateLayout

Inherited from UIElement

Events

CloseButtonClick CloseButtonClick CloseButtonClick CloseButtonClick

Occurs after the close button has been tapped.

public : event TypedEventHandler CloseButtonClick<ContentDialog,  ContentDialogButtonClickEventArgs>
public event TypedEventHandler CloseButtonClick<ContentDialog,  ContentDialogButtonClickEventArgs>
Public Event TypedEventHandler CloseButtonClick( Of ( Of ContentDialog ), ( Of  ContentDialogButtonClickEventArgs ))
function onCloseButtonClick(eventArgs){/* Your code */}


contentDialog.addEventListener("closeButtonClick", onCloseButtonClick);
contentDialog.removeEventListener("closeButtonClick", onCloseButtonClick);
<ContentDialog CloseButtonClick="eventhandler"/>

Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)

Closed Closed Closed Closed

Occurs after the dialog is closed.

public : event TypedEventHandler Closed<ContentDialog,  ContentDialogClosedEventArgs>
public event TypedEventHandler Closed<ContentDialog,  ContentDialogClosedEventArgs>
Public Event TypedEventHandler Closed( Of ( Of ContentDialog ), ( Of  ContentDialogClosedEventArgs ))
function onClosed(eventArgs){/* Your code */}


contentDialog.addEventListener("closed", onClosed);
contentDialog.removeEventListener("closed", onClosed);
<ContentDialog Closed="eventhandler"/>

Closing Closing Closing Closing

Occurs after the dialog starts to close, but before it is closed and before the Closed event occurs.

public : event TypedEventHandler Closing<ContentDialog,  ContentDialogClosingEventArgs>
public event TypedEventHandler Closing<ContentDialog,  ContentDialogClosingEventArgs>
Public Event TypedEventHandler Closing( Of ( Of ContentDialog ), ( Of  ContentDialogClosingEventArgs ))
function onClosing(eventArgs){/* Your code */}


contentDialog.addEventListener("closing", onClosing);
contentDialog.removeEventListener("closing", onClosing);
<ContentDialog Closing="eventhandler"/>

Opened Opened Opened Opened

Occurs after the dialog is opened.

public : event TypedEventHandler Opened<ContentDialog,  ContentDialogOpenedEventArgs>
public event TypedEventHandler Opened<ContentDialog,  ContentDialogOpenedEventArgs>
Public Event TypedEventHandler Opened( Of ( Of ContentDialog ), ( Of  ContentDialogOpenedEventArgs ))
function onOpened(eventArgs){/* Your code */}


contentDialog.addEventListener("opened", onOpened);
contentDialog.removeEventListener("opened", onOpened);
<ContentDialog Opened="eventhandler"/>

PrimaryButtonClick PrimaryButtonClick PrimaryButtonClick PrimaryButtonClick

Occurs after the primary button has been tapped.

public : event TypedEventHandler PrimaryButtonClick<ContentDialog,  ContentDialogButtonClickEventArgs>
public event TypedEventHandler PrimaryButtonClick<ContentDialog,  ContentDialogButtonClickEventArgs>
Public Event TypedEventHandler PrimaryButtonClick( Of ( Of ContentDialog ), ( Of  ContentDialogButtonClickEventArgs ))
function onPrimaryButtonClick(eventArgs){/* Your code */}


contentDialog.addEventListener("primaryButtonClick", onPrimaryButtonClick);
contentDialog.removeEventListener("primaryButtonClick", onPrimaryButtonClick);
<ContentDialog PrimaryButtonClick="eventhandler"/>

SecondaryButtonClick SecondaryButtonClick SecondaryButtonClick SecondaryButtonClick

Occurs after the secondary button has been tapped.

public : event TypedEventHandler SecondaryButtonClick<ContentDialog,  ContentDialogButtonClickEventArgs>
public event TypedEventHandler SecondaryButtonClick<ContentDialog,  ContentDialogButtonClickEventArgs>
Public Event TypedEventHandler SecondaryButtonClick( Of ( Of ContentDialog ), ( Of  ContentDialogButtonClickEventArgs ))
function onSecondaryButtonClick(eventArgs){/* Your code */}


contentDialog.addEventListener("secondaryButtonClick", onSecondaryButtonClick);
contentDialog.removeEventListener("secondaryButtonClick", onSecondaryButtonClick);
<ContentDialog SecondaryButtonClick="eventhandler"/>

AccessKeyDisplayDismissed AccessKeyDisplayDismissed AccessKeyDisplayDismissed AccessKeyDisplayDismissed

Inherited from UIElement

AccessKeyDisplayRequested AccessKeyDisplayRequested AccessKeyDisplayRequested AccessKeyDisplayRequested

Inherited from UIElement

AccessKeyInvoked AccessKeyInvoked AccessKeyInvoked AccessKeyInvoked

Inherited from UIElement

ActualThemeChanged ActualThemeChanged ActualThemeChanged ActualThemeChanged

Inherited from FrameworkElement

CharacterReceived CharacterReceived CharacterReceived CharacterReceived

Inherited from UIElement

ContextCanceled ContextCanceled ContextCanceled ContextCanceled

Inherited from UIElement

ContextRequested ContextRequested ContextRequested ContextRequested

Inherited from UIElement

DataContextChanged DataContextChanged DataContextChanged DataContextChanged

Inherited from FrameworkElement

DoubleTapped DoubleTapped DoubleTapped DoubleTapped

Inherited from UIElement

DragEnter DragEnter DragEnter DragEnter

Inherited from UIElement

DragLeave DragLeave DragLeave DragLeave

Inherited from UIElement

DragOver DragOver DragOver DragOver

Inherited from UIElement

DragStarting DragStarting DragStarting DragStarting

Inherited from UIElement

Drop Drop Drop Drop

Inherited from UIElement

DropCompleted DropCompleted DropCompleted DropCompleted

Inherited from UIElement

FocusDisengaged FocusDisengaged FocusDisengaged FocusDisengaged

Inherited from Control

FocusEngaged FocusEngaged FocusEngaged FocusEngaged

Inherited from Control

GettingFocus GettingFocus GettingFocus GettingFocus

Inherited from UIElement

GotFocus GotFocus GotFocus GotFocus

Inherited from UIElement

Holding Holding Holding Holding

Inherited from UIElement

IsEnabledChanged IsEnabledChanged IsEnabledChanged IsEnabledChanged

Inherited from Control

KeyDown KeyDown KeyDown KeyDown

Inherited from UIElement

KeyUp KeyUp KeyUp KeyUp

Inherited from UIElement

LayoutUpdated LayoutUpdated LayoutUpdated LayoutUpdated

Inherited from FrameworkElement

Loaded Loaded Loaded Loaded

Inherited from FrameworkElement

Loading Loading Loading Loading

Inherited from FrameworkElement

LosingFocus LosingFocus LosingFocus LosingFocus

Inherited from UIElement

LostFocus LostFocus LostFocus LostFocus

Inherited from UIElement

ManipulationCompleted ManipulationCompleted ManipulationCompleted ManipulationCompleted

Inherited from UIElement

ManipulationDelta ManipulationDelta ManipulationDelta ManipulationDelta

Inherited from UIElement

ManipulationInertiaStarting ManipulationInertiaStarting ManipulationInertiaStarting ManipulationInertiaStarting

Inherited from UIElement

ManipulationStarted ManipulationStarted ManipulationStarted ManipulationStarted

Inherited from UIElement

ManipulationStarting ManipulationStarting ManipulationStarting ManipulationStarting

Inherited from UIElement

NoFocusCandidateFound NoFocusCandidateFound NoFocusCandidateFound NoFocusCandidateFound

Inherited from UIElement

PointerCanceled PointerCanceled PointerCanceled PointerCanceled

Inherited from UIElement

PointerCaptureLost PointerCaptureLost PointerCaptureLost PointerCaptureLost

Inherited from UIElement

PointerEntered PointerEntered PointerEntered PointerEntered

Inherited from UIElement

PointerExited PointerExited PointerExited PointerExited

Inherited from UIElement

PointerMoved PointerMoved PointerMoved PointerMoved

Inherited from UIElement

PointerPressed PointerPressed PointerPressed PointerPressed

Inherited from UIElement

PointerReleased PointerReleased PointerReleased PointerReleased

Inherited from UIElement

PointerWheelChanged PointerWheelChanged PointerWheelChanged PointerWheelChanged

Inherited from UIElement

PreviewKeyDown PreviewKeyDown PreviewKeyDown PreviewKeyDown

Inherited from UIElement

PreviewKeyUp PreviewKeyUp PreviewKeyUp PreviewKeyUp

Inherited from UIElement

ProcessKeyboardAccelerators ProcessKeyboardAccelerators ProcessKeyboardAccelerators ProcessKeyboardAccelerators

Inherited from UIElement

RightTapped RightTapped RightTapped RightTapped

Inherited from UIElement

SizeChanged SizeChanged SizeChanged SizeChanged

Inherited from FrameworkElement

Tapped Tapped Tapped Tapped

Inherited from UIElement

Unloaded Unloaded Unloaded Unloaded

Inherited from FrameworkElement

See Also