如何在Windows Phone 8.1中更改内容对话框的标题样式

Ank*_*kar 0 c# xaml windows-phone-8.1

如何在Windows Phone 8.1中更改页面的title属性ContentDialog.

XAML:

<ContentDialog
    x:Class="MyApp.View.Login.ContentDialog1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:MyApp.View.Login"
    Title="DIALOG TITLE">

    <StackPanel VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
        <TextBox Name="email" Header="Email address"/>
    </StackPanel>
</ContentDialog>
Run Code Online (Sandbox Code Playgroud)

我们在这里Title="DIALOG TITLE",我可以改变文字的风格title吗?

编辑

在此输入图像描述

ContentDialog如果title不提的话,如何减少最空的空间?

Rob*_*SFT 5

标题将显示在ContentDialog的TitleTemplate中.您可以根据需要进行更改.

<ContentDialog
    x:Class="MyApp.View.Login.ContentDialog1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:MyApp.View.Login"
    Title="DIALOG TITLE">

    <ContentDialog.TitleTemplate>
        <DataTemplate>
            <!-- what do you want the title to look like -->
        </DataTemplate>
    </ContentDialog.TitleTemplate>

    <StackPanel VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
        <TextBox Name="email" Header="Email address"/>
    </StackPanel>
</ContentDialog>
Run Code Online (Sandbox Code Playgroud)