簡體   English   中英

如何在Windows Phone 8.1中更改內容對話框標題的樣式

[英]How to change style of title of Content Dialog in Windows Phone 8.1

如何在Windows Phone 8.1中更改ContentDialog頁面的title屬性的樣式。

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>

這里我們有Title="DIALOG TITLE" ,我可以更改title顯示的文字樣式嗎?

編輯

在此處輸入圖片說明

如果title未提及,如何減少ContentDialog最上面的空白空間?

標題將顯示在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>

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM